@# 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:

<0> !perror 150
<1> MySQL error: 150 = Foreign key constraint is incorrectly formed
<0> what is your alter table query looks like
<2> ALTER TABLE chemicals ADD CONSTRAINT FOREIGN KEY -> vendor_name (vendor_name) -> REFERENCES vendors (id) -> ON DELETE SET NULL -> ON UPDATE CASCADE;
<2> Those are different lines, sorry for "->"
<0> malex: FOREIGN KEY vendor_name (vendor_name) <-- don;t use vendor_name again, you already named your index vendor_name, not sure if it will cause any conflict
<2> lokus: ALTER TABLE chemicals ADD CONSTRAINT FOREIGN KEY (vendor_name) REFERENCES `vendors` (id) ON DELETE SET NULL ON UPDATE CASCADE;
<2> still fails
<0> malex: it works for me, I copied your create table and run the exact alter table
<3> lokus > *
<2> lokus: I'll make a test database and try doing it there. I am really not sure why it is failing for me. Thank you.
<4> is there a way to update a table and make the data in a field update itself to all CAPS for example.. UPDATE table set field = ALLCAPS(field)
<0> UPPER()
<4> lokus, thanks
<5> whats the type to store date + time? with the NOW mysql func
<0> datetime or timestamp



<5> thanks
<2> lokus: The 150 failure could be happening if a foreign key constraint is being violated by the existing data, couldn't it?
<6> is there PLMYSQL ?
<0> malex: possible
<2> lokus: Didn't help. It works on empty tables, but not on the ones I have data in.
<2> I double-checked that data doesn't violate constraints.
<6> is there PLMYSQL ?
<7> There are stored procedures/functions, triggers, prepared statements etc.
<8> Does Jorge Del Conde come on IRC ?
<9> xlx: Did you have a question perhaps the rest of us could answer?
<8> Essentially I wanted someone to address the bug I reported 35 days ago :) I messaged Therion
<9> Do you have a support contract with MySQLAB?
<8> repeatable bug, affecting others on forums..
<8> No... but, do bug reports need a support contract to be addressed? If so, my mistake
<9> nope. I was going to suggest that you call them directly if you have a support contract
<8> lemme borrow yours
<3> xlx: what bug #?
<8> I messaged you man
<3> xlx: support contract is not necessary, but paying customers do tend to get a certain priority that others do not... such is life
<8> Yeah, very true
<8> holy ****, the kid we're baby sitting just stood up for the first time.. holy ****
<3> xlx: the guy analyzing it is not around right now; I'll bug him tomorrow
<8> Therion, cool man... that's all I wanted... someway to poke the guy :)
<8> thx man
<8> Thanks Therion for the help
<3> most welcome
<10> :)
<11> is there an easy way yo reindex a table?
<11> to*
<12> I am translating this program from php to C http://iol.homelinux.org/timing.php.txt is there a web page that describes the C mysql api?
<7> !m clarks C api
<1> clarks: (MySQL C API) : http://dev.mysql.com/doc/mysql/en/C.html
<12> thank you
<7> np
<13> im tryin to see why this syntax is wrong : ALTER TABLE `forwardings` CHANGE `destination` TEXT NOT NULL;
<14> you need the column name again in there
<14> CHANGE destination destination TEXT NOT NULL
<13> funny, thats what phpmysql uses and its the error it creates
<13> and i got the same error after adding the second destination
<13> ERROR 1170 (42000): BLOB/TEXT column 'destination' used in key specification without a key length
<13> thats the error i get
<14> oh, that's different
<14> it's an error related to the index you have on that column
<13> index?
<14> for text/blob fields, you need to specify the length of the key on the column's contents
<14> right
<13> so like ( `40` )
<14> no, it's on a different line
<14> for instance:
<14> create table a (
<14> b text not null,
<14> c int,
<14> key b
<14> );
<14> that would trigger an error
<14> as b is a text field
<14> to fix that, you need to specify the length
<14> as in "key b(50)" or whatever
<13> ok, interesting how phpmyadmin would cause an error :)
<13> even if i did specify a key
<13> key name(x) ok



<13> ALTER TABLE `forwardings` CHANGE `destination` key `destination`(30) TEXT NOT NULL; didn't work
<15> Is there any way to SUM() a TIMEDIFF() ?
<16> I have installed 4.1 on these 3 linux boxes....just standard releases that came w/centos.
<16> I want to do mysql clustering
<16> I have to uninstall what a got and go to mysql-max right?
<17> rado1 if you run show variables like 'have_ndb' is it enabled?
<16> have ndbcluster NO
<15> firewire, Eroc
<17> what?
<17> oh hi
<15> hey mang
<15> How's it going. Haven't talked to you in a while
<17> good good
<15> My friend Clark from down here (who is a 17 year C programmer) is up in Chicago right now
<15> firewire, I got a quick question for you
<17> ok
<17> I don't live in chicago anymore
<15> I'm SELECT TIMEDIFF(end_time, begin_time) FROM table;
<15> It will give me the time difference. Is there any way to aggregate that to a total amount?
<15> Like take all those rows and have one big combined value?
<17> what does timediff + 0 return?
<15> You could SUM() that
<17> yeah
<15> But some items are only 15 minutes in TIMEDIFF()
<15> I want to combine those too
<17> hmm
<15> TIMEDIFF()+0 is cool though, it didn't give me minutes though
<17> hmm
<15> firewire, You think it's possible?
<17> yeah
<17> you just have to figure out how to cast it to something that can be aggregated
<15> I got an idea
<0> timediff()+0 will leave you with the hour only
<17> it does :(
<15> Yeah, I was just thinking about date_format but the seconds have to be / 60
<15> So summing a hour.minute wouldn't return correct results.
<17> sum(replace(timediff('12:00', t), ':', ''))
<0> even if now()+0 works, that is no good for computng the sum()
<17> *shrug*
<0> sum() may still not work, ***uming 12:40 and 12:40 sum will return 2480
<17> it would take some work to get back a normal time value
<17> but you can still sum it
<0> sure it will sum
<15> I'm trying a few things
<7> sec_to_time(sum(time_to_sec(timefield)))
<17> oh neat
<17> bobfield for the win
<18> http://pastebin.com/628122
<16> if I am runnin 4.1.... have_ndbcluster=NO.... and I want to cluster...I should upgrade right?
<7> The problem came up in the newbie forum the other day
<0> rado1: ndb is only available in the max and you need to enable it with the ndbcluster option
<19> Which is better to use.. TEXT or BLOB ?
<19> I want to keep the database as small as possible.
<0> joseph: depends what you want to store
<19> I want to store html in it.
<0> both text and blob takes equal amount of space
<13> im trying to setup postfix and mysql and when following 1 of the "how-tos" http://workaround.org/articles/ispmail-sarge and im stuck where if i don't have postfix configured for mysql , i can telnet into the mail server and get past "mail from: <mail@foobar.net>" but once i enable mysql in the postfix config file, i can't get past that step, 250 OK never appears.
<19> Doesn't one set aside the full amout of space?
<16> lokus, if have_ndbcluster shows when I show variables, does that mean that I do indeed have that engine?
<0> joseph: diff is binary for blob and character for text
<19> OH!
<19> crud.
<19> I need character
<0> rado1: maybe NO means not in the binary, there is a DISABLED
<16> it just says NO
<18> candidate for ugliest mysql query ever: http://pastebin.com/628122
<0> rado1: you need the max and set the option to enable it
<16> does that mean I can just dload max and ndb rpms and that's all?
<16> I mean I don't have to do a complete uninstall/install of mysql
<15> bobfield, That's giving me a huge number
<15> bobfield, I'm dealing with just a few hours when I limit 10
<0> rado1: the max rpm may works
<20> i have a col in a table that no matter what i do, i cant seem to write to it. it just comes up as default after every insert query, no matter what


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

workaround.org smtp_sasl_password_maps
rockbar mother
from network+install Ubuntu
xen Server refused to allocate pty
hotkey-setup ubuntu dell
#suse
#sdl
iplocation script
linux.dell.com up2date 404
#physics



Home  |  disclaimer  |  contact  |  submit quotes