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



Comments:

<0> er
<1> IS NOT NULL
<2> infi, can the where be after the ORDER BY?
<2> because i need all the result, just need to sort without using the NULL.
<0> yeah
<2> ok thanks
<0> I think you might have to change your collation order, I'm not actually sure on that one.
<3> Shane-S: I'm pretty sure you can't change how sorting is done. NULL is simply considered "smaller" than 1
<4> Shane-S: You can ORDER BY with in IFNULL or COALESCE as one of the expressions.
<4> s/in/an
<5> I'm new to mysql.. # mysql -u root
<5> ERROR 1045 (28000): Access denied ...
<5> how am i supposed to log in?
<4> Shane-S: No need to guess. Just add an explicit ordering for that.
<0> !m geckosenator tutorial
<3> geckosenator: see the part where it says "Using p***word: No"?



<6> geckosenator: (MySQL Tutorial) : http://dev.mysql.com/doc/mysql/en/Tutorial.html
<5> I'm using the tutorial
<2> geko mysql -u root -p
<2> it will ask you to enter the p***word
<5> oh thanks
<5> it works now :)
<2> Xgc: is that supported back to 4.x?
<4> Shane-S: Yes.
<5> is mysql like cobol?
<0> more like BCP.
<7> hey domas, are you still there?
<7> this is xlx (on another computer)...
<8> SQL is like SQL
<8> nothing like COBOL at all
<9> it's like cobol in that it's a language you use to interact with a machine
<2> Xgc: Can you link me to an order by docs example...I am not finding any good examples
<9> and sometimes people on the internet
<10> stupid question: How can I remove all the contents of a database .. its tables and everything in it ... as if it was new
<7> shabbs, are you using rbr ?
<4> CVirus: DROP DATABASE dbname; CREATE DATABASE dbname;
<11> CVirus, I would dump the current db with no data
<10> I dont have access to delete the database
<11> then drop the db , create and feed the dump back in
<10> i only can customize it I guess
<4> CVirus: You want to keep the tables and other structures?
<12> In a date column, how can I select * from where it occurred in the last hour?
<10> Xgc: nope
<9> lakez: no, cuz I have no idea what rbr is
<12> *datetime
<7> shabbs, don't you work for mysql? row based replication
<4> CVirus: Talk the the DB admin and have him give you access to DROP/CREATE your own darn database.
<9> lakez: no, I just act like I work for mysql
<4> CVirus: He can do that do you are limited to just this dbname.
<4> s/do/so
<11> CVirus, so you can drop every table but not the db, hmmm
<12> Easy one I'm sure.. anyone?
<11> great security model
<7> I've found a bug with RBR that i can repeat, i want someone else to test it
<12> Anyone wanna help out a little girl?
<7> before i post it
<12> In a datetime column, how can I select * from where it occurred in the last hour?
<10> GhettoJava: I guess DROP DATABASE dbname; CREATE DATABASE dbname; worked
<11> little girls put you in jail
<4> CVirus: There ya go.
<12> Come on...
<10> Xgc: Thanks :-)
<9> madsara: heard you the first time. select datefield from table1 where datefield < NOW() - INTERVAL 1 HOUR; might work
<12> Thanks shabbs. You da man
<9> madsara: or you might have to use timediff()
<9> !m madsara date time functions
<6> madsara: (Date and Time Functions) : http://dev.mysql.com/doc/mysql/en/Date_and_time_functions.html
<13> Ok. I have what I think to be a replication bug. For some reason, replication keeps failing: http://pastebin.com/557979
<13> It appears that the query fails on the master, but makes it to the slave and then when the following query goes across... boom.
<14> Whocha whocha whocha
<2> so can I do anything in ORDER BY to prevent ordering with NULL...because I can't put it in the where it omits 90% of my resultds
<13> Shane-S: yeah, you should be able to create an IF or something like that that will give you the sort order you want, or sort on multiple fields, perhaps one calculated.
<15> In win32 server, when trying ppm install DBD::mysql, an error returned saying "ppm" is not recognized as an internal command. I installed PXperl and using cpan shell that came with it to install all perl modules
<7> kibab, does the primary key exist on the master? if it does, the replication should work properly
<15> I have a mysql source C:\mysql-5.0.18 and mysql.h i located in C:\mysql-5.0.18\include



<16> kosmonaft: Sounds like something that should go to a perl channel
<3> lakez: bah, in response to the replication problem, it's actually a bug in mysqldump when using --compatible=mysql40. For some reason, the dump drops auto_increment from columns. Making a pastebin for it
<15> Therion: it did :) ... not too much help there :/
<13> lakez: just working with inviso... turns out mysqldump drops the auto_increment on the index...
<16> ahh
<13> I'll post the details
<3> Therion: Does --compatible=mysql40 imply no auto_increment ?
<16> inviso: No, of course not. Why?
<2> kibab or anyone else, I am sorry to ask for someone to do it for me...I don't see what I am supposed to do anywhere in the Order By optimization, the select pages..etc.
<16> inviso: Mostly it removes the charset/collation stuff.
<2> can someone give me an example of sorting on a field ASC that contains NULLs, with the NULLs being AFTER the values ie 1,2,3,NULL
<3> Therion: mysqldump --no-data database table gives the ID column with auto_increment. show create table agrees. add --compatble=mysql40 and it drops it
<16> Shane-S: ORDER BY COALESCE (column, 9999999999999999999)
<7> Therion, any idea why a really long long RBR stops ? Here's a non-replicated myisam :
<7> mysql> load data infile '/tmp/a.txt' ignore into table test.testing;
<7> Query OK, 100000000 rows affected (14 min 33.59 sec)
<2> alright...now to find the documentation TY!
<7> but with RBR on a database table:
<7> mysql> load data infile '/tmp/a.txt' ignore into table testing;
<7> Query OK, 50872504 rows affected (9 min 29.69 sec)
<7> it doesn't get every row, any idea why?
<16> Shane-S: COALESCE returns the first non-null value. So for non-null columns it will order by the column value.. For null columns, it will pretend the value is 999999999999999999
<13> inviso, Therion: here's the paste showing the difference of --compatible=mysql40
<16> inviso: test case?
<16> kibab: ah
<13> Therion: here http://pastebin.com/557997
<3> Therion: kibab is my evil twin
<16> lakez: By RBR are you referring to row-based binlog in 5.1, or something else?
<7> Row based replication
<16> kibab: That is a bug, please report at bugs.mysql.com
<3> I've got it
<16> inviso: Okie dokie
<16> test case only needs to have CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY );
<16> and mysqldump --compatible=mysql40
<13> Therion/inviso: cool... at least it's an easy workaround to keep replication up this time
<16> lakez: ANd it is not loading all of the rows, or the binlog is missing some rows?
<3> Therion / kibab: Already reported under http://bugs.mysql.com/bug.php?id=14515. Thanks for confirming we weren't crazy :)
<7> I think it has to deal with the master not binlog'n every row
<7> maybe there's a size constraint somewhere... that i dunno about
<13> inviso: suppose I could have found that yesterday if I knew what I was looking for at the time
<16> inviso: auto_increment has been around forever, obviously should not be stripped by any MySQL compatibility mode...
<7> i just stopped the slave, and trying to truncate/reload the table... see if it does it
<3> kibab: heh
<16> lakez: Could be a bug with RBR of course
<2> Therion, on the docs page, its doesn't show using a column name, and doing so causes an error, I will have no idea what the values are, is Coalesce(column_name, 99999) right, I tried just (col_name) and it errored as well.
<16> lakez: If you want, try applying the binlog directly on the slave, instead of using replication
<16> lakez: like point in time recovery...
<16> lakez: And see if it still misses rows
<3> Therion: yeah, but I'm wishing I was hopped up on cold medicine so I don't trust my judgement today ;)
<16> Shane-S: The name of the column by which you wish to sort.
<16> Shane-S: What you call a "field".
<2> Therion: Here is my sql select * from images ORDER BY COALESCE (position,9999999999999999999); position is the column name
<16> No space between COALESCE and (
<2> ahh ok thanks
<2> nulls are still first
<16> It would be a faster query if you just set position to some large magic number instead of NULL and instead of using that COALESCE(), if you care.
<16> Of course they're still there.
<16> They should be at the bottom of the list now, though.
<2> well in th console still first
<16> I don't believe you. :P
<2> is there anything better on the documentation then http://dev.mysql.com/doc/refman/4.1/en/comparison-operators.html
<2> can I set them to -1 if the column is unsigned, would that prevent the sorting?
<3> -1 is smaller than 0
<2> yeah, but since the column is unsigned, shouldn't it NOT allow it anyway
<13> inviso: yeah!! replication didn't fail this time ;) funny what auto_increment will do (or not do)...
<17> wtf?
<17> Shane-S - presumably it'll overflow
<3> and then curse at you
<2> ohh well let me just go check my code...perhaps I will just make it so a value of 9999 = don't fill in the form field box.


Name:

Comments:

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






Return to #mysql
or
Go to some related logs:

def: oodalolly
howto gtkipod
mplayer error while loading shared libraries libdirectfb gentoo
#math
#css
#python
#mysql
#php
#math
#linuxhelp



Home  |  disclaimer  |  contact  |  submit quotes