| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Comments:
<0> zardinuk: I *do it in MyISAM. A single statement is atomic anyway <1> with innodb, you really don't have to worry about things getting screwed up <2> GAH! <1> inviso: no it isn't <0> zardinuk: sure it is. You can't select and then issue an update, but there are certainly ways to get it done <0> Same sort of thing applies to stock counts for inventory <1> inviso: only manual locking <3> hi people <3> where can i find mysql icons? <1> and that isn't a single statement <4> anyone know how to fix my broken slave? <0> zardinuk: yeah, not necessary to use more than one statement typically :) <5> is it possible to find the value of a primary key auto_increment field for a row you've just inserted into a table? <0> !m fred87 last_insert_id <6> fred87: (Information Functions) : http://dev.mysql.com/doc/mysql/en/Information_functions.html <5> thanks
<2> So you mean that "transactions" ensure that WHILE I'm executing a SELECT query, for example, and somebody does something to the data I'm fetching, these queries will know about each other and "wait"/catch up with each other? <2> Sounds like a hell to code... <1> use wikipedia to look up MVCC <1> not too complicated <0> KimmoA: yup, thus why it's slower. If your app needs that kind of guarentee, use transactions <2> This should only be NEEDED for stuff where money is involved, yes? <1> better said "if your tables are read only, you shouldn't bother with concurrency" <2> Is that a joke? <7> will providing mysql with an very large insert statement (thousands of rows) cause it to disconnect the client? <2> Or do you mean that the entries are "read only"? <1> KimmoA: if your not using innodb, you have to write extra code to account for deadlocks and what not <1> not deadlocks, but you have to implement your own concurrency and locking <8> or just use artificial locks <8> that time out <7> getting the error on php: the mysql server has gone away <2> zardinuk: ***uming it's a critical multi-billion dollar bank table, right? :) <1> if you ever write to a table that is read and vise versa, you should use the built-in concurrency (innodb), if allyou ever do is write or read, not both, then you don't need to bother <2> Well... you mean write to existing data, right? <1> KimmoA: you give me an example and I'll tell you how it'll break <2> In other words: UPDATE. <2> OK. The table I have is constantly SELECTed from, and sometimes INSERTed to. <0> zardinuk: update inventory set stock_count = stock_count - 3 where id=24; What's wrong with that? <2> Not updated unless I need to fix something manually. <2> It's also DELETEd. <9> hello everyone <10> hello one <1> inviso: one user runs the exact same query at the exact same time, it's like only one ran <2> inviso: Quote 24. <1> inviso: err, two users ran the same query, rather <2> Are you speaking to the right person? <0> zardinuk: not true. <9> I have a question concerning merging specialized tables <1> KimmoA: what is selected from it <2> zardinuk: The application? <1> inviso: yes it's true, explain yourself <0> zardinuk: the statement is atomic. Both will decrement by 3 <1> KimmoA: yeah, what are you selecting? <2> zardinuk: Let's just get things nice and sparkling clean: This "transactions ****up" can only happen on non-transactions tables that do UPDATE queries, right? <9> I have around 44 tables and most of them constitute a arborescence of specialized tables, the "father" one represents properties <1> inviso: in order to decrement by 3, you have to select the initial value, then decrement it, then write it back... you see where the error creeps in? <0> zardinuk: that's not how execution happens. It sets count = (count - 3) <1> right... <2> (I thought he aked for syntax help.) <1> and that's broken down into 3 steps <2> s/aked/asked/ <0> zardinuk: nope, it's atomic <1> inviso: only if you're using innodb, you get it? <1> it's not atomic with isam <11> Is there any sane reason why this can happen: http://www.morbo.org/blog/2006/04/14/its-2-2/ ? <9> I tried using inner joins to select one branch of the specialization and then a left join of two of those individual branches, but I am stuck with the syntax <1> http://www.dbazine.com/oracle/or-articles/kyte1/ <1> there you go inviso <0> zardinuk: http://dev.mysql.com/doc/refman/5.0/en/ansi-diff-transactions.html Please read under the section """You can also use functions to update records in a single operation""" <0> zardinuk: that's an oracle article <1> oracle and mysql use the same concurrency mechanism <0> and the lost updates part is crap. That's not how atomic statements are executed. If I issued a select and then an update, yes. But, not in one statement <0> zardinuk: just read the doc I posted you :( <1> inviso: you don't understand, one statement is one transaction <0> """You can also use functions to update records in a single operation. You can get a very efficient application by using the following techniques:"""
<0> """Modify columns relative to their current value.""" <0> Is that not clear? <1> you could do select @@var for update; @@var+=3; update @@var; <0> that would give you concurrency problems <1> inviso: that article is talking about "statements" as it relates to InnoDB <1> with ISAM, a statement is vulnerable to lost updates <1> with innodb, one statement is one transaction, (auto-commit) <0> zardinuk: dude.... Pause your mouth and read that part of the article I linked. They explicitly give an example like I gave you "UPDATE tablename SET pay_back=pay_back+125;" and explain that it is atomic. <1> ACID isn't only talking about begin and commit, it's practically everything you do with the db <12> zardinuk: ISAM? In year 2006? <0> Any mods around? <1> inviso: yes, it is ACID compliant IF YOU'RE USING INNODB, you get that? <0> zardinuk: you're wrong. <1> haha, you're wrong dude, what makes you think you know what you're talking about? <0> please read the article <1> I know exactly what you're trying to say, and you don't realize the difference between a transaction and a statement <12> zardinuk: You better read first :) <0> zardinuk: is UPDATE tablename SET pay_back=pay_back+125; atomic across MyISAM? <1> no it's not <0> zardinuk: The article states that it is. Read it. <12> zardinuk: Can you prove it? <1> inviso: i'm reading it, I don't see where it says it's ATOMIC <12> zardinuk: I know the answer. I wonder if You know it or you just talk because you heard someone else saying it <1> besides, I know these things, I've been studying database design for years <0> zardinuk: """This is very efficient and works even if another client has changed the values in the pay_back or money_owed_to_us columns.""" <1> k inviso, genius, now read the first sentence of that article <0> Following are some techniques for working with non-transactional tables: <1> and report back to me <13> Does anyone here know of a web based application I can install to enable users to view mysql databases? <0> It's under that section :( <14> The other non-transactional storage engines in MySQL Server (such as MyISAM) follow a different paradigm for data integrity called atomic operations. <0> The part about non-transactional tables, IE MyISAM <13> Kind of like a database client on the web. <0> moj0rising: phpmyadmin <0> !tell moj0rising about gui <6> Alrighty. <13> Thanks! I like and use phpmyadmin.. <1> inviso: have you accepted that I'm right yet? <9> anyone here could explain me how to merge multiple tables? <13> I amlooking for someting like... <1> You can generally code around the need for row-level locking. Some situations really do need it, and InnoDB tables support row-level locking. Otherwise, with MyISAM tables, you can use a flag column in the table and do something like the following: <12> moj0rising: Many people like phpmyadmin <10> inviso, What? <13> ..AdoDB on the web. <2> This feels like TCP VS UDP. <13> Like the openoffice DB application, only web based. <2> "UDP can do what TCP provides but you have to code extra"... <12> zardinuk: You can use LOCK TABLES instead of flag, but that does not mean you know the answer of the question: "Is UPDATE MyISAM_table ... atomic or not?" <15> UDP: the data transmision for real men <15> inviso: how'd you get ops? <0> cj: You'd be surprised :) <2> cj.com ****s. <1> salle: it's atomic with innodb, not with isam <2> They want me to LOGIN to get my p***word back... <0> !kick zardinuk Please learn to read <12> zardinuk: In some cases it is guaranteed to eb atomic while in other cases it is not. It's quite obvious when by the way :) <12> inviso: isam? <13> Does anyone know where I could get an application like that (above)? <0> awww, he doesn't love me :) <12> inviso: Who uses ISAM nowadays? <5> inviso: nice :) <1> inviso: why are you trying to get me kicked? I'm trying to help you understand something here <0> zardinuk: Please read that article. All the way through. <2> I don't get this... <0> salle: heh, no one :) <1> inviso: I just did... now what do you have to say? <2> inviso kicked himself by typing that bot command <2> ? <0> KimmoA: yeah, forgot the bot doesn't know me yet :) <12> inviso: Correct. Many people use MyISAM however <1> salle: help inviso understand that update table set value = value + 125 is actually a read and a write, not some magic silver bullet operation
Return to
#mysql or Go to some related
logs:
dd: reading `/dev/hdd': Input/output error ubuntu ubuntu keeps asking keyring password #mysql riceandmeat
#linux #physics vga acroynm
administrator mode ubuntu Su returned with an error irssi list themes php 5.12
|
|