@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info


Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16



Comments:

<Darien> *should*
<scott> worth a shot
<scott> Darien, it only seems to be one database........ and that was working fine on 4.1 before on 2 different servers
<Darien> you mean one table?
<scott> Darien, nah whole database
<Darien> w33rd
<Darien> maybe it's InnoDB?
<scott> nah, myisam for sure... there's one memory table too
<kippi> hey
<kippi> how easy would it be to search a database and search for key words and give you a count of them
<Darien> you could search a *table*
<scott> Darien, errors gone, data gone.... Table 'thread' is marked as crashed and should be repaired
<Darien> so repair it
<scott> Darien, how can I repair all tables in a db ?
<scott> there's like 700 in this db
<Darien> !m scott mysqlcheck
<SQL> scott: (Overview of the Client-Side Scripts and Utilities) : http://dev.mysql.com/doc/mysql/en/Client-Side_Overview.html
<scott> thanks
<Darien> try mysqlcheck --all-databases --auto-repair --use-frm
<firewire> or mysqlcheck
<firewire> yeah
<firewire> why --use-frm?
<Darien> just in case :p
<Darien> it's not actually necessary
<Darien> but if you have a problem relating to the myi header, try it
<firewire> . Note: Use this mode only if you cannot use regular REPAIR modes. .MYI header contains important table metadata (in particular, current AUTO_INCREMENT value and Delete link) that are lost in REPAIR ... USE_FRM. Don't use USE_FRM if the table is compressed because this information is also stored in the .MYI file.
<Darien> neat
<Darien> be nice if they said that in --help
<scott> Darien, error : Can't create new tempfile: ...
<Darien> the whole error?
<scott> that's it on the repair, the tablename is after that
<scott> error : Table './db/vb3_attachment' is marked as crashed and last (automatic?) repair failed
<scott> -rw-rw---- 1 mysql mysql 0 Mar 5 22:11 vb3_user.MYD
<scott> -rw-rw---- 1 mysql mysql 1.0K Mar 5 22:13 vb3_user.MYI
<scott> Darien, backup worked. ugh
<Darien> ouch
<scott> another reason to setup replication maybe
<scott> means another 10 more servers though
<jasper_> I've been looking aimlessly for this, but haven't found anything; thought I'd give it a try over here. Does anyone know if there's anything similar to what Oracle can do in terms of message-p***ing and / or blocked triggers, in MySQL? What I'd like to do is call a stored procedure, and wait for an INSERT or UPDATE on a given table to occur before the stored procedure ends.
<scott> 17 hours data... fortunately it was only a game and nothing too important
<scott> well just checked, everything else seems fine. hmm, that was weird
<blobaugh> ive been looking around and i cant figure out how to make a timestamp look like YYYYMMDDHHMMSS, got any leads for me?
<Darien> !m blobaugh format
<SQL> blobaugh: (Miscellaneous Functions) : http://dev.mysql.com/doc/mysql/en/Miscellaneous_functions.html
<Darien> hmm
<Darien> !m blobaugh date_format
<SQL> blobaugh: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
<Darien> yay
<Darien> second time's a charm
<blobaugh> heh, ok ill try that one i havent looked at it yet
<scott> hey, does anyone know if it's possible to replicate mysql on the same system? instead of remotely
<Darien> sure
<scott> that might be work ok for now then
<bcc> hi guys, which version should i use for production?
<scott> that might be ok/work ok for now then ;-)
<jasper_> Hmm. I guess that. I'm looking for a way to see if a table has been updated, without continuous polling. Is that possible in MySQL 5? Anyone? (:
<frank-> triggers
<frank-> ?
<Darien> triggers
<Darien> !m jasper_ triggers
<SQL> jasper_: (Triggers) : http://dev.mysql.com/doc/mysql/en/Triggers.html
<jasper_> Darien: Yes. (: But how, from a language like PHP, do I detect if a trigger has been fired?
<Darien> jasper_: when a trigger is triggered, put an event into a separate memory table and then have your action server or whatever poll that table
<kippi> hi, I am getting his error Resource id #3 from http://pastebin.com/585841
<kippi> any ideas ?
<jasper_> That's what I was thinking too, but I was hoping there would be a cleaner way. (:
<jasper_> Sounds like I'll be going for that then; thanks Darien.
<Darien> you can't trigger external code from within MySQL
<jasper_> Darien: Yes; but if it were possible to have a trigger send a message to another thread within MySQL .. Oracle does something like that with RDBMS.SEND_MESSAGE, etc.
<jasper_> Then I could have a stored procedure wait for a message from a trigger and wait for the stored procedure to finish in my application.
<blobaugh> ahha! CURRENT_TIMESTAMP + 0, sheesh Darien i should have just asked first cause i never found that page, thanks
<Sharcho> Is there a way to join a table with a subselect?
<bobfield> kippi, that's not an error, you just haven't fetched any row(s)
<kippi> blobaugh: how would i do that?
<kippi> I tired $result1=mysql_fetch_***oc($result);
<kippi> but got a blank page
<bobfield> you need to do something like $row=myql_fetch_***oc();
<bobfield> then echo $row['somefieldname'];
<blobaugh> so where would one find the meaning of the resource errors? ive looked but i cannot find
<Darien> what resource errors?
<pflanze> Sharcho: put the subselect into table position ",(...) as foo", then use it's results the same way you're using columns from a table.
<pflanze> Be warned that mysql might not optimize subselects intelligently.
<pflanze> s/subselects/queries with subselects/
<Xgc> Sharcho: It's called a 'derived table'. MySQL supports that just fine. It's usually the suggested form.
<pflanze> well, "just fine" might be a bit of an overstatement. I've run into speed problems the first time I'm using subselects.
<pflanze> with mysql 4.1 (maybe 5.0 is better?).
<Koharski> ok. I am trying to create an SQL database on a computer through SSH
<Koharski> mysqladmin -u mysql create forums
<Koharski> mysqladmin: CREATE DATABASE failed; error: 'Access denied for user: '@localhost'
<pflanze> -u mysql probably doesn't exist, Koharski
<pflanze> maybe you've meant mysqladmin -u root create forums
<Koharski> yeah, that works
<Koharski> thanks
<Koharski> ^_^
<kippi> SELECT count(disposition) FROM cdr WHERE 'ANSWERED';
<kippi> why is that brining me back 0
<kippi> when there is at lease 5 counts of ANSWERED
<bobfield> 'ANSWERED' is the value in a column?
<kippi> yep
<bobfield> you need to say which column e.g. WHERE colname = 'ANSWERED'
<kippi> so SELECT count(disposition) FROM cdr WHERE 'ANSWERED';
<kippi> opps
<kippi> so WHERE disposition = 'ANSWERED'
<kippi> working
<bobfield> yes that's the idea
<Apachez> if yuo accidently deletes rows from a myisam table... is there a way to retrieve those rows somehow? can myisamchk be used for this in one way or another or are there any hexvalues you could alter in the MYD file ?
<lsmith> yes .. from your backups :-/
<Apachez> i think i have seen some way but i forgot the method
<Apachez> perhaps i should tell that its not for me, its for a question on forum.mysql.com
<lsmith> well if you did it inside a transaction you could rollback
<Apachez> i thought that myisamchk -e would help this guy but obviously not
<Apachez> lsmith: myisam doesnt support transactions
<Apachez> http://forums.mysql.com/read.php?21,73723,73941#msg-73941
<lsmith> well .. if you want to go hardcore at the problem
<lsmith> the data will probably not yet have gotten overwritten
<lsmith> i dont remember the exact myisam internals .. but i doubt it does more than mark the rows as deleted
<Apachez> $ myisamchk -e weatherdata
<Apachez> Checking MyISAM file: weatherdata
<Apachez> Data records: 0 Deleted blocks: 839435
<Apachez> obviously myisamchk can "see" these deleted rows, so why cant it retrieve them ?
<gut> DCC SEND "(#MATH-SAYS_****_YOU-#MATHSAYS_****_YOU-#MATHSAYS_****_YOU)" 0 0 0
<Viper007Bond> if i have a column that's set to datetime and I wanna just match for the day and not the time, do I need to use LIKE or is there a better way?
<bobfield> WHERE date_format(datetimecolumn,'%Y-%m-%d') = 'somedate'
<Viper007Bond> thanks
<bobfield> np
<will> Viper007Bond, LIKE works better.
<arjenAU> Viper007Bond: split the col into separate date and time cols if you need to search like that. otherwise queries will be slow. the above solution can't use an index
<arjenAU> and actually will makes a good point. for this particular case LIKE would actually be able to use an index
<bobfield> I stand corrected
<will> bobfield, It's the effort that counts ;)
<ikonia> bobfield is my hero
<bobfield> my fan club is still rather small
<ikonia> you have a big fan here
<bobfield> well I try
<bobfield> can't please everyone
<ikonia> on 2 occasion you've pulled it out of the bag
<ikonia> for me
<bobfield> solutions are divided into 'works' and 'optimal'
<arjenAU> bobfield: define works... a) syntactically correct or b) provides the result this year given a reasonable size dataset ?
<bobfield> getting it to go from point A to point B is a major part of the battle in my book
<bobfield> now with 10 million rows may be a different story
<bobfield> but I do try to listen and learn
<ikonia> your my hero
<bobfield> well I've still got a lot to learn yet
<bobfield> but I'm not afraid to take a stab with what I do know
<ikonia> you pulled it together for me so I'm made up
<antirez> is there a version of SUM() that can be used to sum multiple rows even if I use GROUP BY?
<kippi> with mysql is there away to work out the average from a list of numbers?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #mysql
or
Go to some related logs:

lazellama
+ubuntu+alacarte +sudoer
#web
rpm ragnarok server repos -hardware -hard -ram -rom
#qemu
perl remove ANSI escape sequences
eternal_drake
#centos
v200z ndiswrapper wireless
lufsmount ping



Home  |  disclaimer  |  contact  |  submit quotes