#mysql
07 October 2007
Total 21 pages. You are browsing page 21/21.
First :: Prev :: [...] [17] [18] [19] [20] [21] :: Next :: Last
22:33 <****> robboplus: but keep in mind you're spawning a new process each second and a new connection setup/teardown as well. usually not so much of a problem, but it may cause some overhead in case many people do so on a terribly busy server
22:33 <****> Xgc, my thought exactly.
22:33 <****> Xgc, i should have tested on mysql before saying it, though
22:35 <****> uws thank you again - i will check in a sec to see how stressing is that
22:35 <****> robboplus: "SHOW PROCESSLIST" is a rather cheap operation I presume so I don't think it'll cause any problem in practice (except if 1000 people keep doing it)
22:37 <****> nono it's just me and i need that for a few mins :)
22:38 <****> kjaer: btw, a movie can have multiple genres? otherwise I'd strongly suggest to use ENUM() instead of SET()
22:38 <****> kjaer: Or do it Right [tm] and normalize to a "movie_genre" table ;)
22:38 <****> Its a downloaded script, cant get it to work though. So id probably spend the night recoding from scratch.
22:39 <****> is an equality operation, the Conformance Rules of Subclause 9.9, Equality operations, also apply.
22:39 <****> from experiments i am doing it seems that PHP's ip2long and MySQL's INET_ATON are compatible. is this true?
22:39 <****> gnari: It doesn't seem to discuss the empty set case.
22:42 <****> andresmh: i think so, but you can also use a (signed) 32 bit integer column
22:44 <****> Is it possible to have a derived field? One that is calculated by some function?
22:45 <****> lgbr: What is "derived" field?
22:45 <****> You can of course use views to "dynamically" extend tables
22:46 <****> hello, i'm using dreamweaver and testing server WAMP, i'm having problems with the database connection
22:46 <****> Mixmasterxp_: so?
22:46 <****> i get error with the password and username for localhost connection
22:46 <****> how do i resolve this?
22:47 <****> Mixmasterxp_: double check your database connection settings, make sure the account exists and had access to the database/tables you want to use
22:47 <****> uws: when I do INET_NTOA on a negative integer generated by ip2long the result is null. it works fine on positive numbers though.
22:47 <****> how do i set up a database account?
22:47 <****> andresmh: hmmm. then my bet is you're missing half the IPv4 space :)
22:47 <****> !tell grant
22:48 <****> grant
22:48 <****> Xgc, i tested some more, and mysql and postgres do agree that 4 not in (emptyset) returns true, and 4 in (emptyset) returns false
22:48 <****> Mixmasterxp_: Come on, this is all covered in the basics. Please read the manual instead of asking us to read it out loud
22:48 <****> Mixmasterxp_: just read the section about grants
22:48 <****> in wamp?
22:49 <****> uws: is this a mysql error or the way i am calling the function or what?
22:49 <****> uws: sounds like it might be what I need. Where can I find documentation on it?
22:49 <****> Xgc, the equality comment refers to the fact that a IN (x,y,z) means (a=x OR a=y OR a=z), where null semantics are well defined
22:50 <****> andresmh: not sure, my experience with INET_ATON is null/void/nonexistent :)
22:50 <****> lgbr: http://dev.mysql.com/doc/refman/5.0/en/views.html
22:50 <****> lgbr: (since 5.0)
22:50 <****> Xgc, if we cosider NULL as UNKNOWN, it seems clear (to me) that UNKNOWN IN () should return FALSE
22:51 <****> Xgc, but i'll agree that this is a corner case that probably has no great importance
22:51 <****> set-theoretically there is a difference between "the empty set" and a "set containing the empty set"
22:52 <****> |{}| == 0 whereas |{{}}| == 1
22:52 <****> (the |x| denotes the cardinality)
22:53 <****> uws: thanks
22:53 <****> is anyone else here using wamp?
22:54 <****> Wamp? \Wamp\, n. [From the North American Indian name.] (Zo["o]l.) The common American eider. ;)
22:56 <****> the W would imply using (W)indows... so no :)
22:57 <****> I prefer looking *through* windows into the great sky, personally
23:00 <****> any reasons why mysqldump would create unfinished dump files? it just cuts off at the end...no errors on the screen.
23:01 <****> how can I get a count of rows returned from a query?
23:02 <****> lgbr: select count(*) from table;
23:02 <****> lgbr: or more specifically...all depends what api you are usuing to connect to mysql, but mysql does return total rows along with the result set.
23:03 <****> lgbr: http://www.php.net/manual/en/function.mysql-num-rows.php
23:04 <****> lgbr: some of the lang clients return it as a array or such, you could just do a size on it
23:05 <****> what do you guys/gals recommend as the best HASH function to apply on each varchar in a table of millions of varchars, to minimize the risk of duplicate hashes for different rows?
23:07 <****> loquitus_of_borg: sha1sum or md5sum
23:08 <****> but since a hash is by defintion a possibly-many-to-one mapping you cannot rely on it being an unique identifier
23:08 <****> uws: yeah. i understand it is not a 100% guarantee
23:09 <****> looking for the safest bet
23:09 <****> concatenate both the sha1sum and the md5sum ;P
23:09 <****> uws: that's good!
23:09 <****> :)
23:09 <****> uws, however, it's a good consolation prize if after your app screws up, you can publish your MD5 collision in a journal of computer science.
23:09 <****> what about the sha1sum and md5 sum AND checksum?
23:09 <****> (Yes, I know, it's possible to manually construct MD5 collisions.)
23:09 <****> true. that would be funny
23:10 <****> simetrical: collisions in MD5 space between two strings that are 1000+ chars long?
23:10 <****> Simetrical: I used almost the same comments in the documentation of some text processing software I wrote a while ago ;)
23:10 <****> that's harder.
23:11 <****> loquitus_of_borg, MD5 collisions can be obtained for arbitrary prefixes, last I heard, as long as you're willing to tack tons of junk to the end of each.
23:11 <****> come on, this is not related to the original question at all... md5sums are pretty okayish to use in real-world applications
23:12 <****> uws: I like your pragmatic response :).
23:12 <****> They aren't okayish, they're completely reliable for all intents and purposes if you avoid the known exploit and keep an eye out for future ones.
23:12 <****> It's more likely your data centers will all simultaneously get struck by meteors than that you'll get an MD5 collision by accident.
23:13 <****> have you seen deep impact?!
23:14 <****> Simetrical: I'm still waiting for generated content that contains their own md5 hash sum. I'll get notification emails if such a thing happens in my system ;)
23:15 <****> uws: seemms to be workng, ill test it some more though
23:16 <****> uws, generated content that contains its own MD5 hash? Why are you interested in that?
23:17 <****> Simetrical: Not really, but it's an assert()ion somewhere in my code that'll make me rich if it triggers ;)
23:48 <****> if i create a database with php on a page after connecting to it, will it try to create the database again everytime the page is loaded?
23:48 <****> hi, i think webmin just corrupted all my permissions. i can't do anything with the database, but the files are there and ok. is there a way to completely reset all the permissions ?
23:49 <****> can anyone recommend an easy to use and free mysql backup script or program?
23:50 <****> Is it possible to create a custom field in a query where the value depends on some condition?
23:50 <****> Such as... SELECT type, isOn FROM mods; isOn = "ACTIVATED" if mods.activated=true
23:50 <****> sdz, SELECT type, IF(mods.activated, 'ACTIVATED', '') AS isOn FROM mods;
23:50 <****> hadees: you can use the builtin mysqldump
23:51 <****> hadees, mysqldump.
23:51 <****> Mixmasterxp_, unless you tell it not to, then of course it will. It will fail if the database already exists, of course.
23:51 <****> i know about mysqldump but i need something that will do incremental backups and delete the old ones
23:51 <****> ok
23:52 <****> anybody on totally resetting permissions to my db ?
23:52 <****> hadees, mysqlhotcopy will work, for MyISAM, and you can get simple shell-script wrappers to make it rotate them. It's not really incremental, however.
23:55 <****> how do I give a user the ability to issue mysqladmin extended-status?
23:58 <****> hi
23:58 <****> how do I connect to mysql thorugh a local socket from the command line?
23:59 <****>
--- Log closed Mon Oct 08 00:00:33 2007
Total 21 pages. You are browsing page 21/21.
First :: Prev :: [...] [17] [18] [19] [20] [21] :: Next :: Last
