| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Comments:
<0> all we asked is for him to print a query to the screen <0> heh <1> http://hashmysql.org/paste/viewentry.php?id=1677 <0> tti.`trackerId`=? <2> rosenjon: Looks more like a prepared statement. <0> you have to put single quotes around ? <1> what does that mean <1> prepared statement <2> rosenjon: What did you expect the ? to do? <1> just to clarify -- i didnt code this, im just trying to debug it <3> you don't have to put quotes if it's for a prepared statement <2> rosenjon: In a prepared statement, the ?'s would represent parameters that you can set prior to submitting the request. <1> i see <2> In fact, you can't use quotes for the ? placeholders in a prepared statement. <1> anyone have any idea why it might be bugging out? <1> i dont know if any of you are familiar with tikiwiki, but that is where this comes from
<1> and before you say it -- i have been to that channel, but its tough to find people who know about certain code, since it is a pretty big project <1> the people in this channel seem to be better and debugging sql anyway <1> would it help if i pasted php source code, or do you guys only deal with sq <1> l <0> I doubt anyone wants to wander through that php source code <4> rosenjon: http://us3.php.net/mysql_stmt_prepare <2> rosenjon: Sounds more like a performance issue with the tables/query. <2> rosenjon: There's no error, correct? <1> well..no explicit error -- but this sql shows up in processes because it stalls out <1> execution time becomes indefinite and it crashes the program <2> rosenjon: Probably just takes very long or eventually times out. <1> xgc -- i dont think it times out, bc if i kill it manually through mysql, the program is restored to functionality <1> it manifests itself visually on the site in the form of a bad item count <2> rosenjon: You'll probably want to obtain the specific settings for the parameters of the prepared statement so that you can run the query outside the application. <1> i see <1> so run it in phpmyadmin, see if error is reproduced, and then debug sql <2> rosenjon: Right. The application is probably just waiting for the request to return. <1> cool <1> sounds like a good idea <2> rosenjon: You can't just stuff this into phpmyadmin. <1> i kniw <2> Ok. <1> i have to track down variables for stored procedure and place them back into sql, right? <2> s/stored procedure/prepared statement/ <1> or prepared statement, whatever <1> my newbieness shines through <2> Yes. Basically determine the concrete query that is generated by this prepared statement and then debug it directly. <1> one thing i did notice -- tiki_tracker_item_fields is ***igned two different variables <1> or temporary names, whatever it is called <1> why would this be necessary? <2> rosenjon: It's not. But the user might be treating these values independently (or they used to be separate). <2> rosenjon: For instance, let's say I create an application that deals with name and nickname. There's some code that obtains and uses name in one area of the program and nickname in the other. The query is: SELECT name, nickname FROM ...; and there's code that grabs one or the other, depending on context. <2> rosenjon: Then later in life we decide to get rid of nickname in the database and use name in all cases. Instead of rewriting the application, we simply change the query to access the same field: SELECT name, name as nickname FROM ...; and the rest of the code never has to be touched. <1> i see <1> makes sense <2> rosenjon: Over the long life of a project/application, these things can creep in. <1> so there might be other functions that require that alias, even though it is redundant <2> Yes. <1> xgc -- there is visual manifestation of my bug in the program also -- that query is responsible for counting the number of records ***igned to each record group, and that count is bugged <2> or, who knows, maybe they don't have the data today and are rpeparing for later down the road when name and nickname are actually stored separately. <1> it is somehow aggregating records ***igned to different groups, as opposed to counting for each group <1> my theory on this bug is that the sql statement is being asked to count in a loop, and in someway that makes the number to count impossibly large <2> rosenjon: Well, an error in using aggregation is common. You might have a JOIN issue that's the root cause of the performance issue. This may also be the reason for the aggregation problems. <1> i have seen a few join statements that might be culprits actually <2> rosenjon: It's more likely someone didn't understand the JOIN/aggregation issues. <1> very possible <1> the cool thing about open source is that you get 100 people working on a project for free, therefore accelerating its progress <2> rosenjon: Sorry. I misread the query slightly. My explanation is not correct. This is a case where the same table is JOINed twice in the same query. That's the reason for referencing the table twice and using different aliases. <1> the problem is that if you get careless coders, it can also decelereate progress at that rate <1> XGC: Im going to have to read up on this to fully understand... <5> Hello guys, I have a question... can I create file /etc/my.cnf on version 4.1 ? <2> rosenjon: This is most often seen with property tables, where you will need to obtain more than one property per row in the result set. <5> The current version 4.1 doesn't seem to use it, and I'm getting lots of server gone away errors, perhaps if I create a /etc/my.cnf file with broader parameters??, anyone's thoughts?? <2> rosenjon: For instance, you could have a person table with person id. Then in the properties table, you might have prop_name='firstname', prop_val='Jon', prop_person_id=1; and a second prop_name='lastname' with corresponding values and person link. Then to get both firstname and lastname in one row for any person, you'd have to JOIN the property table to the person table twice. <2> _Thor: There are several ways to track down which config file is being used. lsof is probably a good one. <5> cool <6> hi <6> i need to create a database on a machine on which i have root, but not mysql root <0> then reset the mysql root p***word <6> not an option <0> or use your user to create a new database
<6> how? <0> if they granted you that permission <0> !m Jmax create mysql database <7> Jmax: Nothing found <6> the only mysql user i have does not have permission to create <0> !m Jmax create database <7> Jmax: (CREATE DATABASE Syntax) : http://dev.mysql.com/doc/mysql/en/CREATE_DATABASE.html <2> Jmax: Well, if you want to get the MySQL admin mad at you, you can restart the MySQL server with --skip-grant-tables, restart and do as you wish. <6> i know how to <0> then ask the admin to grant it to you <6> heh. <2> Jmax: You don't need to ask. You're root. :) <6> Xgc: of course, but the db may be in use, so i don't want to do that <6> oh well <6> i'll do it <6> is there anyway to do it with mysqladmin? <2> Warning: "Planned maintenance in 0 seconds" <2> Jmax: You'd need mysql root (or similar access) to use mysqladmin. <2> Jmax: I think. <6> hm ok <2> Jmax: Doesn't hurt to try. <2> Jmax: There's probably a start/stop script buried under /etc <6> there is <3> you can just send it a TERM signal <3> MySQL traps the signal and will do its own cleanup and so on <3> not the best way, but it's a good next-to-last resort <2> Probably the same way shutdown is handled. <8> Hi! Is there a way to "foresee" how many hits there is in a query when limiting? <6> ah crap <9> SELECT SQL_CACL_FOUND_ROWS .. <9> SELECT FOUND_ROWS(); <6> i can't grant with --skip-grant-tables <10> anyone here maybe know how to take away some user permission to ssh login <8> tnx <6> EvilDin: elaborate? <10> i need just that some of users will have only ftp acces and no ssh <6> EvilDin: set their shell to /bin/false <6> i think <6> ok <6> so i created the database... <6> now how do i create a user with access to it, without having access to a user with grant privs? <11> can someone point me to documentation for select...in ? <11> i'm not sure what the "in()" function does <12> !man in <7> (Comparison Functions and Operators) : http://dev.mysql.com/doc/mysql/en/Comparison_Operators.html <11> thanks... <9> for: column IN (1,2,..) it's like saying column = 1 OR column = 2 OR column = .. <11> gotcha <13> Hi! <11> how fast are subselects in 4.1? <11> i mean is it ok practice to use them? <9> twelve <11> haha <11> i know, vague question <12> 12.00003 <11> :p <14> can you do date and time functions on a int field that contains a unix timestamp? <14> well, the whole seconds since 1970 thing <15> besides PhpMyAdmin, what else can I use to set up a database on my linux server? <16> the mysql command line :) <15> I came in here once before asking how to get started and I guess my questions were too vague :( <15> I don't want to learn anything too complex though, I just want to have a database to store information that a user enters from a website which is hosted on the same machine <0> you'll need some kind of db design either way <15> Yes, well, is there something that can aid me in doing that? <15> Besides cli.. <17> korhalf: once you get over the fear of the cli, it's very useful :-) <17> are you looking for a graphical schema designer? <15> It's not a fear, I'm just lazy. <17> korhalf: I actually never worked my head around Access, because I found the graphical interface more comple to learn :-) <15> So where do I start then. <15> I guess I have to learn afterall <17> well, that or google for graphical schema design tools :-) I'm sure they exist, just that the time spent working out CREATE TABLE is probably well spent <15> well i did that in phpmyadmin <17> right
Return to
#mysql or Go to some related
logs:
gentoo downgrade mysql5 +suse +sound +lineout 10.1 function excersise c# yum pvr150mce #math apache2 mod_authz automatix vmware vmmon quicktables for slackware linux split Output file suffixes exhausted +fbxine +sources.list
|
|