Imig: Salle: that’s what I was asking, what is “always” in this context
Clyatt: Imig: Always has no context
Pleasure: I am running mysql 4.1, data is utf8 formated in latin1 tables, I excport the data dump then import it on another machine identical VM data is not correct
Clyatt: Imig: Always means always
Clyatt: Imig: regardless of context
Imig: Salle: that means that called with the same input it will produce the same results. Having “reads SQL” I was under impression that MySQL would give me stability within transaction
Clyatt: BerhanK: Storing utf8 data in latin1 is known to give you nightmares
Farrugia: Copy and paste the same txt utf8 formated fixes the issue
Hux: Salle: I know but too late to change it atm
Clyatt: Imig: reads SQL means it SELECTs some data from some tables and as such it can not be deterministic
Imig: So if the DB doesn’t get written in this transaction we’re in repeatable read then called with the same arguments we’ll always get the same result
Clyatt: Imig: If the returned value depens somehow on the data within some table it is not deterministic. Should be obvious
Imig: I understand deterministic as an opposite of stochastic, i.e. calling rand or other non-stable function
Clyatt: Imig: non-deterministic != stochastic
Imig: But yeah, it was never stated in the docs and deterministic + reads sql wasn’t erroneous definition for the function
Clyatt: Imig: NOW is non-deterministic, but the values it returns are not eandom
Imig: We’ll fix it, thanks for help
Imig: That’s why he’s called.
Imig: Salle: anyway my point was that I regarded the state of the DB as a variable. but we’ll fix the function definition
Clyatt: Imig: Imagine your function does: RETURN SELECT COUNT*/input_parameter FROM some_tbl; Every time the number of rows in that table changes the result of the function also changes. Thus the result depends on something outside of the function code and that makes it non-deterministic. It is neighter random nor stochastic
Imig: Salle: when does mysql return the cached value?
Clyatt: Imig: What is cached value?
Imig: If I have function myfuncparam int11 return int11 deterministic reads sql
Imig: And it gets called multiple times within a transaction
Imig: Will mysql cache that value between statements?
Zucco: Hello all. I need your help
Zucco: SELECT dsl.account_id,grouped_dsl.max_id FROM diesel dsl INNER JOIN SELECT account_id, maxid as max_id FROM diesel GROUP BY account_id grouped_dsl ON dsl.account_id = grouped_dsl.account_id AND dsl.id = grouped_dsl.max_id
Gavagan: Zucco: tried dsl.account_id = grouped_dsl.account_id AND dsl.id = grouped_dsl.max_id ?
Zucco: But I also need fields ‘last_update_date’ and FROM_UNIXTIMElast_update_date. How do I put that into query? last_update_date is from diesel too
Rossean: Zucco: sorry was too quick 😀
Rumery: Zucco, is there some problem with just adding it to the outer query?
Rumery: If you want the last_update_date of your “latest” suppose thats what you do with the maxid item
Zucco: Rumery: I tried to put like this: dsl.last_update_date, FROM_UNIXTIMEdsl.last_update_date, but values are not correct. I have to tie it all correctly somehow.
Zucco: So, I hafta put like ‘grouped_dsl.last_update_date, FROM_UNIXTIMEgrouped_dsl.last_update_date’ ? should I change something in inner query?
Rumery: Zucco, if your query picks the right id for each account, then it should give the right values for these
Adley: Zucco: sqlfiddle.com is an easy way to share your schema, your data, and the queries you’re testing. It saves us time and makes it more likely that you’ll get an answer! Make sure you set it to use MySQL.
Peacock: So guys, any tips how to basically copy the db from one machine to another?
Mcnany: Environments are identical