Re: InnoDB per-table-space backup and move

2006-02-11 Thread Heikki Tuuri
Brandon, sorry, you cannot move .ibd files between installations. The ability to do so is in the TODO, but I cannot promise any release date. Currently, the only way to move individual InnoDB tables between installations is the dump + import method. Best regards, Heikki Oracle

Re: InnoDB and locking

2006-02-11 Thread Heikki Tuuri
Patrick, it should work. You have only shown a fragment of the application code. Maybe there is a bug somewhere else. If you write a very simple test program to test this, do you still get the duplicate values? Best regards, Heikki Oracle Corp./Innobase Oy InnoDB - transactions, row level

RE: update a Blob field using UPDATE

2006-02-11 Thread Kerry Frater
Thanks for the reference. Sorry for the delay in responding but I had been away. Yes the mystring$ is built with single strops to quote the content. I have an issue running this command so I have worked around it by putting the content of the var mystring$ into a text file and then putting it into

Re: Migration

2006-02-11 Thread George Law
looks like there is only a partial query INSERT INTO `jos_banner` VALUES (1,1,'banner','OSM 1',0,46,0,'osmbanner1.png ','http://www.opensourcematters.org','2004-07-07$ there is no ending ', so when it hits the 'jos_banner /*!4 ALTER TABLE `jos_banner` it sees it as the end of the field

Insert and Update together

2006-02-11 Thread Andre Matos
Hi List, I would like to know if it is possible to combine Insert and Update in one SQL instruction. This is what I want to do: I have two tables: one where I will perform and Update replacing m0 by scr. If MySQL find a m0, it will need to perform an insert into a log table including the

Re: fulltext searches

2006-02-11 Thread Gabriel PREDA
Hi Octavian, Yes indeed... IT is a stop word... despite being the acronym for Information Technology... *It* is a third-person neuter pronounhttp://en.wikipedia.org/wiki/It_(pronoun)in the English language. You can make it IT a normal word by excluding it from the build-in stop word list ! In

Re: Insert and Update together

2006-02-11 Thread George Law
Andre, I tried this a couple weeks ago... I think you want the on duplicate option for the INSERT query. depends what version you have... I think this was introduced in mysql 4.1 insert into values () on duplicate key update set x=2,y=5; unfortunately, the server I was testing this

Fw: Insert and Update together

2006-02-11 Thread Rhino
Oops, I meant to send this to the list so that everyone could benefit, not just to Andre. -- Rhino - Original Message - From: Rhino [EMAIL PROTECTED] To: Andre Matos [EMAIL PROTECTED] Sent: Saturday, February 11, 2006 12:11 PM Subject: Re: Insert and Update together -

How to select data if not in both tables?

2006-02-11 Thread Grant Giddens
Hi, I have 2 tables like: product_table: prod_id item_name price data data etc sale_table: prod_id sale_price If I want to select all the products that are in the product_table, but not in the sale_table, how to make the query? The product_table has all the products, but the sale table is

Re: Passing db names to a stored proc in MySQL 5

2006-02-11 Thread Peter Brawley
Rory, PREPARE query_statement FROM SELECT * FROM ?.sites If MySql 5.0 chokes on that, why couldn't you write sxomething like ... SET @sql = CONCAT(SELECT * FROM , dbname, .sites ); PREPATE qry_stmt FROM @sql; PB Rory McKinley wrote: [EMAIL PROTECTED] wrote: Rory McKinley [EMAIL

Re: How to select data if not in both tables?

2006-02-11 Thread Peter Brawley
Grant, If I want to select all the products that are in the product_table, but not in the sale_table, how to make the query? The product_table has all the products, but the sale table is a subset of the product_table. SELECT * FROM product_table p LEFT JOIN sale_table s USING (prod_id)

Re: InnoDB and locking

2006-02-11 Thread Peter Brawley
Patrick, c.setAutoCommit(false); ... rs = statement.executeQuery(select request_id from requestid_innodb for update); ... String updateQuery = update requestid_innodb set request_id=; updateQuery = updateQuery + nextRequestId; tempStatement = c.createStatement();

Re: How to select data if not in both tables?

2006-02-11 Thread Bob Gailer
Peter Brawley wrote: Grant, If I want to select all the products that are in the product_table, but not in the sale_table, how to make the query? The product_table has all the products, but the sale table is a subset of the product_table. SELECT * FROM product_table p LEFT JOIN sale_table

Re: How to select data if not in both tables?

2006-02-11 Thread Michael Stassen
Bob Gailer wrote: Peter Brawley wrote: Grant, If I want to select all the products that are in the product_table, but not in the sale_table, how to make the query? The product_table has all the products, but the sale table is a subset of the product_table. SELECT * FROM product_table p

arbitrary ORDER BY

2006-02-11 Thread Steve Lefevre
Hey folks - I have a project where I need to sort rows by an arbitrary order. I seem to recall at some point where I was able to do some SQL like: ORDER BY type = the first type, type = another type, type = yes another arbitrary type ... However, my arbitrary ORDER BY

Problem starting

2006-02-11 Thread CasperLinux
I had a working database then had a power glitch shutdown the computer. Afterwards I began receiving all sorts of errors. I cleaned through most of them but this one is stumping me. I tried to uninstall and reinstall mysql-server to no avail. Anyone have any kind words? arthur:/etc/X11#

Re: Insert and Update together

2006-02-11 Thread Andre Matos
No George. I took a look there before sent this email to the mysql list. My case it is not a duplicate record. What I want is that if the update in one table happen, it will be proceed by an insert in another table like a log of changes. Andre On 2/11/06 12:48 PM, George Law [EMAIL PROTECTED]

Re: How to select data if not in both tables?

2006-02-11 Thread Peter Brawley
Bob, SELECT * FROM product_table p LEFT JOIN sale_table s USING (prod_id) WHERE s.prod_id IS NULL; I have not tested that but I don't think it will work. Try: SELECT item_name FROM product_table WHERE prod_id not in (select prod_id from sale_table); These two queries are logically

Returning values from an INSERT

2006-02-11 Thread bob pilly
Hi everyone, im new to SQL and have a question that someone can hopefully answer If i am inserting a new record into a table that has an auto_increment field in it, is it possible to get the value of that field returned automatically instead of having to do a SELECT.. For example my

RE: Insert and Update together

2006-02-11 Thread Logan, David (SST - Adelaide)
Hi Andre, I don't believe 4.1 is able to do this. Version 5.0.18 (latest) has the ability to use triggers to do exactly what you describe. You may have to consider an upgrade to achieve this functionality or do something in php. Regards

Re: Returning values from an INSERT

2006-02-11 Thread Michael Stassen
bob pilly wrote: Hi everyone, im new to SQL and have a question that someone can hopefully answer If i am inserting a new record into a table that has an auto_increment field in it, is it possible to get the value of that field returned automatically instead of having to do a SELECT..