#mysql
22 October 2007
Total 24 pages. You are browsing page 1/24.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
--- Log opened Mon Oct 22 00:00:37 2007
00:00 <****> jftsang: http://dev.mysql.com/doc/refman/5.0/en/load-data.html
00:21 <****> Question, i know how to check if a value exists in an array ' field in (1,2,3,4)', now how do you check to see if any values in one array exist in another? '(2,3,4) in (7,6,5,4)' ?
00:24 <****> 2 IN (7,6,5,4) OR 3 IN (7,6,5,4) OR 4 IN (7,6,5,4)? :D
00:24 <****> doesn't scale well eh?
00:25 <****> I don't know, maybe there's a better way.
00:25 <****> i guess i need an intersect command
00:30 <****> maybe data type 'set' is the answer
01:10 <****> I have a table named attachments - and i use only 2 queries on it on 2 columns. I've added another column, a boolean on which i dont have any queries. The original queries dont fetch the new column.
01:10 <****> Ever since - the select speeds are x2 slower, how can that be?
01:12 <****> I dunno, slower table scans? You shouldn't be noticing a difference because if your database is constructed and indexed properly, most selects should take like a millisecond or two regardless.
01:12 <****> it can't really.
01:14 <****> Oh it can
01:18 <****> hey, i could really use some sql help for what might be a complicated problem
01:19 <****> neshmi: then what are you waiting for?
01:19 <****> Well here is the problem
01:19 <****> i need to go through a database I'm prepping for migration to rails
01:19 <****> it has a LOT of column names throughout the whole collection of tables with spaces in them
01:19 <****> Hello, I am try to restore a database and am getting an error. I am using MySQL 4.1 and this is the error: ERROR 1153 (08S01) at line 994: Got a packet bigger than 'max_allowed_packet' by tes
01:19 <****> is there a way to recursively go throughout the database and rename those column names to remove the spaces?
01:20 <****> maybe to do some sort of grep function on it... just not quite sure how to do it... i'm not sql scripting genius
01:20 <****> Acert93: raise the max_allowed_packet or split the query up
01:24 <****> chadmaynard: I tried running 'mysql --max_allowed_packet=32M' but was getting a mysqld: command not found message
01:24 <****> Acert93: it is a variable. set it in my.cnf
01:24 <****> so anyone got any ideas for a script that'd solve my problem?
01:26 <****> Thanks chadmaynard. I will google how to do that :)
01:28 <****> neshmi: show tables and run alter statements
01:29 <****> yeah, i can do it manually
01:29 <****> but this may have to happen several times
01:29 <****> so i would like to automate it
01:29 <****> neshmi: [write a script to] show tables and run alter statements
01:30 <****> i have no idea how to do variables or anything like that in a sql statement
01:30 <****> or loops
01:30 <****> or iterations ;)
01:30 <****> neshmi: do it in perl
01:30 <****> or something
01:31 <****> hmm... probably a good place to start hunting... i don't know how to script in perl, but its an idea
01:41 <****> neshmi: bash?
01:42 <****> probably another good way, i'd liek to find a way to script it in ruby itself, but thats where the original problem is coming from anyway
01:42 <****> haha
01:42 <****> fine
01:43 <****> my bashing skills are a bit better than my perl skills, but are surely not up to par anyway
01:43 <****> i'll keep poking around, hopefully find something
01:44 <****> anyway, thanks chadmaynard for your suggestions... hopefully get me going in the right direction! :)
01:44 <****> cheers
02:02 <****> Hola, I'm using MySQL 4.0.24 and want to update to 5.x. Can I do this without installing intermediate versions as most people are telling me?
02:02 <****>5.0
02:04 <****> chadmaynard: Hm. Can you point me to some useful documentation on the matter?
02:04 <****> chadmaynard: Related to avoiding intermediate versions preferably..
02:04 <****> !google mysql upgrade 4.0 4.1
02:04 <****> mysql upgrade 4.0 4.1: http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-4-0.html
02:04 <****> !google mysql upgrade 4.1 50
02:04 <****> mysql upgrade 4.1 50: http://dev.mysql.com/doc/refman/4.1/en/information-functions.html
02:04 <****> eh the first one worked
02:05 <****> http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html
02:06 <****> Urgh.
02:07 <****> The primary thing I'm having difficulty with is syntax change. I'm curious as to the technical justification for requiring an intermediate version be installed, which is pretty reckless.
02:08 <****> it isn't required. I said it is often easier. If i were doing it i'd skip 4.1 but you might have trouble with it. I wouldn't know
02:08 <****> Hi. I'm familiar with setting up replication, but I've never heard of a method for having a one server replicate specific databases, while acting as the master server for other databases. Is such an arrangement possible?
02:09 <****> chadmaynard: The tricky thing is I've done a mysqldump from the 4.0 and an attempted import to 5.0, but syntax changes have made that unachievable
02:10 <****> brad[]: just copy the files. Are they innodb or myisam or both
02:10 <****> ?
02:10 <****> MyISAM
02:10 <****> just copy the databases over
02:11 <****> shutdown mysqld beforehand
02:11 <****> will try that...
02:12 <****> i wouldn't copy the mysql folder
02:12 <****> chadmaynard: How would you do it?
02:14 <****> brad[]: i mean the mysql folder in the datadir
02:14 <****> I don't follow.
02:14 <****> I have a table 'tasks' - which include fields 'ended_at' and 'user_id'. I want to return a list of 5 distinct user_id's sorted desc by ended_at. How do I accomplish this?
02:14 <****> brad[]: do you know where the datadir is?
02:15 <****> chadmaynard: Yes, /var/lib/mysql
02:15 <****> brad[]: i would copy everything in /var/lib/mysql except /var/lib/mysql/mysql/
02:15 <****> chadmaynard: ah
02:17 <****> trym untested: SELECT DISTINCT user_id FROM tasks ORDER BY ended_at DESC LIMIT 5
02:18 <****> anyone here major or minor in CS? i'm tryign to decide whether a CS minor is useful.. or if you actually use all the theory classes in a "real life"
02:19 <****> the_giver2: i am minoring in CS but have not graduated so my opinion may not count
02:20 <****> lol chadmaynard what are you majoring in.. and why did you decide on CS minor?
02:21 <****> the_giver: Electrical Engineering major. I just minored because EE and CS are so closely intertwined now.
02:21 <****> hmm
02:23 <****> zal: I tried that.. but it doesnt give me the correct ones
02:23 <****> meh. bachelor degree shouldn't just be about "real life"
02:23 <****> zal: it seems the order by isnt working
02:24 <****> minor in linguistics or philosophy or something
02:25 <****> hi
02:25 <****> what exactly does that query do? http://pastebin.com/d17f39c91
02:26 <****> ie. what does it mean to DELETE FROM two tables?
02:27 <****> I wish I had majored in math and majored in EE for masters
02:27 <****> Hello, please, anybody help me look my code for anti mysql, if work?
02:27 <****> anti-injection
02:28 <****> good evening
02:28 <****> how do I correct "incorrect key for table [foo]" ?
02:28 <****> myisamchk -o doesn't seem to do it, nor -r
02:29 <****> zal: any ideas?
02:32 <****> got it... -r seems to have done it now
02:32 <****> nope spoke too soon :-(
02:32 <****> anyone?
02:36 <****> Hey, I'm having trouble with a function. When I run the query it returns 'No data - zero rows fetched, selected, or processed
02:36 <****> when it should be returning true or false.
Total 24 pages. You are browsing page 1/24.
First :: Prev :: [1] [2] [3] [4] [5] [...] :: Next :: Last
