Re: case when then

2009-02-25 Thread Ali Deniz EREN
I tried something like this but it doesnt work. Thank you.. "SELECT table_1.id FROM table_1 CASE WHEN (table_1.pid <> 0) THEN LEFT JOIN table_2 ON table_1.pid = table_2.id WHEN (table_1.nid <> 0) THEN LEFT JOIN table_3 ON table_1.nid = table_3.id END" 2009/2/24 Ali Deniz EREN > table

Re: case when then

2009-02-25 Thread Joerg Bruehe
Hi Ali, all! Ali Deniz EREN wrote: > table_1 > id pid nid > --- > 1 60 > 2 05 > > table_2 (referer -> pid) > id title body > --- > 1 title1 body_text1 > 2 title2 body_text2 > 3 title3 body_text3 > 4 title4 body_text4 > 5

Re: Concurrent Inserts with merged table

2009-02-25 Thread Johan De Meersman
I know this doesn't answer any of your questions directly, but I imagine that if you run the load data on the insert table of the merge set, the rest might still be available for operations through the actual merge alias. not sure, though, feel free to report test results :-) On Wed, Feb 25, 2009

Cost of using over dimensioned columns

2009-02-25 Thread Morten
Hi list, I'm wondering what the "cost" (if any) is by using eg. mediumtext over text, or largetext over mediumtext. Is there a non-negligible reason to not just just largetext? And how about varchars, what's the "cost" of using varchar(1000) rather than varchar(20)? My intuition tell

Re: Cost of using over dimensioned columns

2009-02-25 Thread Olaf Stein
Morten, Check out http://dev.mysql.com/doc/refman/5.1/en/storage-requirements.html For example, the cost of longtext (L+4 bytes) over mediumtext (L+3 bytes) is 1 byte per record. If you have a lot of records this might be significant. In the case of varchar it is similar, L+1 if less than 255 by

Re: Upgrade story / request for insight

2009-02-25 Thread Claudio Nanni
Hi Jerry, probably does not help you very much and excuse me in advance for this, but there is little use in having a development/preproduction system on different architecture, none of the issues you faced with windows (services installation probably) will show up on a CentOS box. In particular an

RE: Upgrade story / request for insight

2009-02-25 Thread Gary W. Smith
Jerry, To touch a little more on Claudio's statement, you are trying to compare monkey's and trucks when you talk about mysql on these two different OS's. Microsoft is a different best when it comes to the install. What caught my attention though is you are running mysql 4.0 on CentOS. Thi

non-auto increment question

2009-02-25 Thread PJ
I want to insert a new table entry 1 number higher than the highest in the field (id). I cannot use auto-increment. And I want to show the value of the field to be added in an input field on the web page: if (isset($_REQUEST["AddNewBooksRequest"])) { $SQL = "SELECT MAX(id) FROM book"; $

RE: Upgrade story / request for insight

2009-02-25 Thread Jerry Schwartz
From: Claudio Nanni [mailto:claudio.na...@gmail.com] Sent: Wednesday, February 25, 2009 3:51 PM To: Jerry Schwartz Cc: MySql Subject: Re: Upgrade story / request for insight Hi Jerry, probably does not help you very much and excuse me in advance for this, [JS] No apology necessary. but ther

RE: Upgrade story / request for insight

2009-02-25 Thread Jerry Schwartz
From: Gary W. Smith [mailto:g...@primeexalia.com] Sent: Wednesday, February 25, 2009 4:36 PM To: Claudio Nanni; Jerry Schwartz Cc: MySql Subject: RE: Upgrade story / request for insight Jerry, To touch a little more on Claudio's statement, you are trying to compare monkey's and trucks

RE: non-auto increment question

2009-02-25 Thread Gary W. Smith
Not sure that this is the problem BUT you should probably qualify the name of the variable such that "SELECT MAX(id) AS id FROM book". But you don't want "max(id) as id" but rather "max(id) + 1 as id". With that you can then just return the final value. Also, if you don't want to alias the val

Re: [PHP] RE: non-auto increment question

2009-02-25 Thread PJ
Ashley Sheridan wrote: > On Wed, 2009-02-25 at 14:10 -0800, Gary W. Smith wrote: >> Not sure that this is the problem BUT you should probably qualify the >> name of the variable such that "SELECT MAX(id) AS id FROM book". But >> you don't want "max(id) as id" but rather "max(id) + 1 as id". With >>

Re: Concurrent Inserts with merged table

2009-02-25 Thread buford
> > not sure, though, feel free to report test results Results not good so far. I created a big load file by creating a list of all the files on my server (using "find / -printf ...). and appending that file four of five times over for several hundred thousand rows. Then I did a LOAD DATA CONCUR

RE: [PHP] RE: non-auto increment question

2009-02-25 Thread Jerry Schwartz
>Being rather new to all this, I understood from the MySql manual that >the auto_increment is to b e used immediately after an insertion not >intermittently. My application is for administrators (the site owner & >designates) to update the database from and administration directory, >accessed by u

RE: [PHP] RE: non-auto increment question

2009-02-25 Thread Jerry Schwartz
>Being rather new to all this, I understood from the MySql manual that >the auto_increment is to b e used immediately after an insertion not >intermittently. My application is for administrators (the site owner & >designates) to update the database from and administration directory, >accessed by us

invalid write of size 1 when execute mysql_real_query

2009-02-25 Thread Cui Shijun
hi, Valgrind reports that there are some errors in my test code, one of which seems like this: tests amysql::connector - blocking and asynchronous mutliple statement query: .==15827== Thread 2: ==15827== Invalid write of size 1 ==15827==at 0x40269F7: memcpy (mc_replace_strmem.c:402) ==15827=

Re: Concurrent Inserts with merged table

2009-02-25 Thread mos
At 07:38 PM 2/25/2009, you wrote: > > not sure, though, feel free to report test results Results not good so far. I created a big load file by creating a list of all the files on my server (using "find / -printf ...). and appending that file four of five times over for several hundred thousand

Re: Upgrade story / request for insight

2009-02-25 Thread Walter Heck
Maybe this could help you: http://blog.olindata.com/2008/11/testing-environment-setting-up-virtualbox-for-easy-vm/ http://blog.olindata.com/2009/02/testing-environment-installing-centos-52-on-virtualbox/ No need for a separate machine :) regards, Walter OlinData: Professional services for MySQL