column exists but unknown

2009-03-03 Thread Richard Whitney
', 'Rich', 'Text in List') latin1_swedish_ci No Text as you can see campaign_id clearly exists in the table Is my table corrupt? Any ideas? Thank you for your help. Richard -- Richard Whitney phpmy...@gmail.com http://phpmydev.com Ofc. 602-288-5340 Ofc. 877-624-6302 Fax. 480-704-4559 You come up

Re: column exists but unknown

2009-03-03 Thread Richard Whitney
space_id int(10)   UNSIGNED No  auto_increment scheme_id int(10)  UNSIGNED No 0 campaign_id int(10)  UNSIGNED No 0 type enum('Text', 'Banner', 'Rich', 'Text in List') latin1_swedish_ci  No Text as you can see campaign_id clearly exists in the table Is my table corrupt? Any ideas? Thank

Best method for checking if a row exists.

2008-12-12 Thread Nicholas Ring
Hello, What is the best method to check if (one or more) row exists (note: primary key is auto inc and table engine is InnoDB - but what if these were not true) ? 1) SELECT * FROM table WHERE condition Check to see if the result set is non-empty. 2) SELECT COUNT(*) AS cnt FROM table WHERE

Re: Best method for checking if a row exists.

2008-12-12 Thread Perrin Harkins
SELECT EXISTS( SELECT * FROM table WHERE condition ) - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org

Re: How to determine if temporary table exists

2008-11-21 Thread mos
At 12:00 AM 11/21/2008, you wrote: In the last episode (Nov 20), mos said: At 08:02 PM 11/20/2008, you wrote: Try drop table if exists Tablex; Ahhh, I don't necessarily want to drop the table if it already exists. :) If the table already exists then I'll add new rows to it (and keep

How to determine if temporary table exists

2008-11-20 Thread mos
How can I determine if a temporary table exists? Normally I use something like: create temporary table Tablex like Table1; show tables like Tablex; but the Show Tables never displays any rows for a temporary table even though the temporary Tablex exists. (All in same thread). So

Re: How to determine if temporary table exists

2008-11-20 Thread Moon's Father
Try drop table if exists Tablex; On Fri, Nov 21, 2008 at 9:53 AM, mos [EMAIL PROTECTED] wrote: How can I determine if a temporary table exists? Normally I use something like: create temporary table Tablex like Table1; show tables like Tablex; but the Show Tables never displays any rows

Re: How to determine if temporary table exists

2008-11-20 Thread mos
At 08:02 PM 11/20/2008, you wrote: Try drop table if exists Tablex; Ahhh, I don't necessarily want to drop the table if it already exists. :) If the table already exists then I'll add new rows to it (and keep the existing rows). If the table doesn't exist, then I'll create it. I suppose

Re: How to determine if temporary table exists

2008-11-20 Thread Dan Nelson
In the last episode (Nov 20), mos said: At 08:02 PM 11/20/2008, you wrote: Try drop table if exists Tablex; Ahhh, I don't necessarily want to drop the table if it already exists. :) If the table already exists then I'll add new rows to it (and keep the existing rows). If the table doesn't

RE: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-25 Thread Jerry Schwartz
-Original Message- From: Jim Lyons [mailto:[EMAIL PROTECTED] Sent: Sunday, August 24, 2008 12:00 PM To: Deniss Hennesy Cc: mysql Subject: Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists correction, the command that's failing evidently is the 'create table columns_priv

Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-25 Thread Deniss Hennesy
All Dear friends İ am mentioning that 2 different server one is running on mysql 4.1 (Current) (dumped) the other is 5.1..xxx (New) (restored) İ solved my problem in such a way that i droped in my new server mysql and test databases mysql show databases;

Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-24 Thread Jim Lyons
The command that's failing evidently is the drop table columns_priv which is why you're getting the error message: *ERROR 1050 ( ) at line : Table 'columns_priv' already exists* I assume you're trying to restore the mysql database from a backup and the script is trying to re-create

Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-24 Thread Jim Lyons
( ) at line : Table 'columns_priv' already exists* I assume you're trying to restore the mysql database from a backup and the script is trying to re-create the privileges tables. You cannot create a table that already exists, so you must drop it first. When you installed a mysql instance

ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-22 Thread Deniss Hennesy
Hi to list i ve installed new server. while i was restoring my backup to this server. i took this error and restoring procees is to stop. *ERROR 1050 ( ) at line : Table 'columns_priv' already exists* My old server mysql version is mysql-client-4.0.20 is running on old server

Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-22 Thread Jim Lyons
You're restoring the mysql database itself, do you mean to do this? You probably do if it's a new server but there already exists a mysql database so, unless your restore program does DROP TABLE before each create, you'll keep getting this error. On Fri, Aug 22, 2008 at 10:22 AM, Deniss Hennesy

Re: ERROR 1050 ( ) at line : Table 'columns_priv' already exists

2008-08-22 Thread Jim Lyons
: You're restoring the mysql database itself, do you mean to do this? You probably do if it's a new server but there already exists a mysql database so, unless your restore program does DROP TABLE before each create, you'll keep getting this error. On Fri, Aug 22, 2008 at 10:22 AM, Deniss

DROP TABLE IF EXISTS - doesnt??

2008-08-15 Thread roger.maynard
I am finding that DROP TABLE IF EXISTS mytable; Works fine if the table exists - but if it doesn't exist I get an error? Surely it should not error and just not try to drop the table. Is it me?

Re: DROP TABLE IF EXISTS - doesnt??

2008-08-15 Thread Fish Kungfu
this feature to get a quicker startup with -A Database changed mysql show tables; +---+ | Tables_in_lsldatabase | +---+ | lslstore | +---+ 1 row in set (0.00 sec) mysql drop table if exists recipes; Query OK, 0 rows affected

RE: DROP TABLE IF EXISTS - doesnt??

2008-08-15 Thread roger.maynard
I am getting this problem when I am calling this from within a stored procedure and from the command line area but from MySQLQueryBrowser Windows package. I have tried the DROP TABLE IF EXISTS from the mysql DOS-type command line and it doesn't error - I do notice that (also in your example

RE: DROP TABLE IF EXISTS - doesnt??

2008-08-15 Thread Martin Gainty
I am certain the SQLBrowser program authors want to hear about this error It may be due to the fact that MYSQL procedures need to have a different delimiter (//) instead of ; e.g. use DBNAME; DROP PROCEDURE IF EXISTS TABLE_NAME; delimiter //; Anyone? Martin

RE: DROP TABLE IF EXISTS - doesnt??

2008-08-15 Thread Fish Kungfu
Maybe what I am seeing in the Query Browser area is in fact a Warning message and not an error!! Ahhh...yes maybe that's it. Just fyi, here is the detail of the warning: mysql drop table if exists recipes; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql SHOW WARNINGS

INSERT WHERE NOT EXISTS syntax

2008-01-23 Thread roger.maynard
Can anyone tell me why this isn't working... v5.0 INSERT INTO master_comments (comment_no,comment_text,language_id) SELECT comment_no,comment_text,language_id from mComments WHERE NOT EXISTS (SELECT comment_no FROM master_comments); I thought I had it working once but now it isn't

RE: INSERT WHERE NOT EXISTS syntax

2008-01-23 Thread roger.maynard
I think I sorted it out ... INSERT INTO master_comments (comment_no,comment_text,language_id) SELECT comment_no,comment_text,language_id from mComments WHERE NOT EXISTS ( SELECT comment_no FROM master_comments WHERE mComments.comment_no = master_comments.comment_no ); Hope this helps someone

Re: how to drop index if exists

2007-12-05 Thread Adam Lipscombe
Fantastic, thanks very much! Adam Rob Wultsch wrote: On Nov 29, 2007 4:34 AM, Adam Lipscombe [EMAIL PROTECTED] wrote: Folks How can one conditionally drop an index in MySQL? Googling shows that the drop index does not support an if exists qualifier - apparently a bug has been raised

Re: how to drop index if exists

2007-12-05 Thread Adam Lipscombe
shows that the drop index does not support an if exists qualifier - apparently a bug has been raised but as far as I know its not fixed yet. Does anyone know of a work-around? TIA - Adam Sent my first response late at night and not the community... And the response also sucked. DROP INDEX

Re: how to drop index if exists

2007-12-05 Thread Baron Schwartz
On Dec 5, 2007 7:03 AM, Adam Lipscombe [EMAIL PROTECTED] wrote: Sorry I got carried away in my former response. When I tried this, ALTER IGNORE TABLE tbl_name DROP INDEX seems to fail if the index does not exist. Right. ALTER IGNORE means that rows that violate unique indexes won't be

Re: how to drop index if exists

2007-12-03 Thread Rob Wultsch
On Nov 29, 2007 4:34 AM, Adam Lipscombe [EMAIL PROTECTED] wrote: Folks How can one conditionally drop an index in MySQL? Googling shows that the drop index does not support an if exists qualifier - apparently a bug has been raised but as far as I know its not fixed yet. Does anyone know

RE: how to drop index if exists

2007-12-03 Thread Rolando Edwards
You may want to check to see if the index exists first. Just query the table INFORMATION_SCHEMA.STATISTICS: SELECT COUNT(1) FROM INFORMATION_SCHEMA.STATISTICS WHERE table_schema = 'given schema' AND table_name = 'given table name' AND index_name = 'given index name'; This returns the number

Re: how to drop index if exists

2007-12-03 Thread Rob Wultsch
I actually suggested that last night, and thought better of it because the alter ignore was so much simpler... On Dec 3, 2007 11:18 AM, Rolando Edwards [EMAIL PROTECTED] wrote: You may want to check to see if the index exists first. Just query the table INFORMATION_SCHEMA.STATISTICS: SELECT

how to drop index if exists

2007-11-29 Thread Adam Lipscombe
Folks How can one conditionally drop an index in MySQL? Googling shows that the drop index does not support an if exists qualifier - apparently a bug has been raised but as far as I know its not fixed yet. Does anyone know of a work-around? TIA - Adam -- MySQL General Mailing List

DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Jesse
I'm attempting to restore a couple of backups, and part way through, I get the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS alumni' at line 1 Query is: DROP TRIGGER IF EXISTS `alumni

Re: DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Baron Schwartz
Hi, Jesse wrote: I'm attempting to restore a couple of backups, and part way through, I get the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS alumni' at line 1 Query is: DROP TRIGGER

Re: DROP TRIGGER IF EXISTS throws error??

2007-10-05 Thread Jesse
Are you sure that's the exact query and error message? The query has a backtick; the error message has none, which is unusual for a purely syntactic error. It makes me suspicious that the error is coming from something else: maybe a subtly mangled file. I found the problem. When I ran the

mysqldump - IF NOT EXISTS

2007-05-23 Thread Johannes Skov Frandsen
Hi Im contructing a build script and would like to dump my dev db with mysqldump so I can run a deploy script on the production server with the update db. I would like to construct the script so that it updates existing tables/fields/posts and add new tables/fields/post if they do not exists

RE: WHERE (NOT) EXISTS problem

2007-02-01 Thread Brown, Charles
PM To: mysql@lists.mysql.com Subject: WHERE (NOT) EXISTS problem Having a very bad time with the subject sorts of queries. Here is a simple reproduction of the problem for me. Perhaps I'm blind/stupid while looking at the docs, or there's a bug... mysql version 5.0.24-standard simple schema

RE: WHERE (NOT) EXISTS problem

2007-02-01 Thread Price, Randall
@lists.mysql.com Subject: Re: WHERE (NOT) EXISTS problem Michael Fischer wrote: Having a very bad time with the subject sorts of queries. Here is a simple reproduction of the problem for me. Perhaps I'm blind/stupid while looking at the docs, or there's a bug... mysql version 5.0.24-standard simple

WHERE (NOT) EXISTS problem

2007-01-31 Thread Michael Fischer
people WHERE EXISTS (select * from people_city_map where cid = 1); +-+ | name| +-+ | michael | | daniel | | glenn | | susan | | lisa| | reggie | +-+ Huh? Shouldn't that be limited to the people mapped to New York (michael, daniel)? Conversely: mysql

Re: WHERE (NOT) EXISTS problem

2007-01-31 Thread Chris
... mysql SELECT distinct name FROM people WHERE EXISTS (select * from people_city_map where cid = 1); +-+ | name| +-+ | michael | | daniel | | glenn | | susan | | lisa| | reggie | +-+ Huh? Shouldn't that be limited to the people mapped to New York (michael

Drop Index if Exists

2006-09-01 Thread Adam Lipscombe
Folks, Does this work in MYSQL 5? I tried DROP INDEX [NAME] IF EXISTS; and got an error check your syntax. Thanks - Adam -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: Drop Index if Exists

2006-09-01 Thread Visolve DB TEAM
Hello Adam,This is the exact syntax to drop the index.DROP INDEX index_name ON tbl_nameThanksVisolve DB Team . - Original Message - From: Adam Lipscombe [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Sent: Friday, September 01, 2006 3:28 PM Subject: Drop Index if Exists Folks, Does

Re: Drop Index if Exists

2006-09-01 Thread Adam Lipscombe
Thanks What I am getting at is: does the IF EXISTS qualifier work in this context? I have an index that is present in some DB's but not in others. I want to run a generic script to upgrade them all. I don't want the script to stop if the index is not present. Thanks - Adam Visolve DB TEAM

Re: Return list where no data exists

2006-08-23 Thread Chris
Neil Tompkins wrote: Using this query seems to hang my computer and mySQL server reported the queries had been LOCKED. How many records are in each table? It could take a while, especially if you don't have indexes on the join fields. -- MySQL General Mailing List For list archives:

Return list where no data exists

2006-08-21 Thread Neil Tompkins
Hi, I've two tables. What query do I need to use to get a list of all records from table A where table B doesn't contain a a mathing record. For example TableA ID Name TableB Date ID Name Thanks Neil _ Be one of the first

Re: Return list where no data exists

2006-08-21 Thread Johan Höök
Hi Neil, what you need is a LEFT JOIN: SELECT a.* FROM TableA a LEFT JOIN TableB b ON a.ID = b.ID (assuming ID is what you relate the tables on ) WHERE b.ID IS NULL; should hopefully do what you want. /Johan Neil Tompkins skrev: Hi, I've two tables. What

RE: Return list where no data exists

2006-08-21 Thread Neil Tompkins
Using this query seems to hang my computer and mySQL server reported the queries had been LOCKED. Date: Mon, 21 Aug 2006 11:09:35 +0200 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] CC: mysql@lists.mysql.com Subject: Re: Return list where no data exists Hi Neil, what you need is a LEFT

Re: If exists query.

2006-04-24 Thread Paul Halliday
On 4/23/06, John Hicks [EMAIL PROTECTED] wrote: Paul Halliday wrote: I am doing queries that produce a table that looks something like this: Count | IP Address| First Seen| Last Seen | Days 5000 10.0.0.1 2005-12-102006-04-15 50* 6500 10.0.0.2

Re: If exists query.

2006-04-24 Thread Shawn Green
--- Paul Halliday [EMAIL PROTECTED] wrote: On 4/23/06, John Hicks [EMAIL PROTECTED] wrote: Paul Halliday wrote: I am doing queries that produce a table that looks something like this: Count | IP Address| First Seen| Last Seen | Days 5000 10.0.0.1

Re: If exists query.

2006-04-24 Thread Peter Brawley
Paul, I am doing queries that produce a table that looks something like this: Count | IP Address | First Seen | Last Seen | Days 5000 10.0.0.1 2005-12-10 2006-04-15 50* 6500 10.0.0.2 2006-04-01 2006-04-06 3** *So of the 5000 events "count(*) between 2005-12-10 and

Re: If exists query.

2006-04-23 Thread John Hicks
Paul Halliday wrote: I am trying to formulate a query that will increment if a condition is true. For example, if I do a select (just let me know if there was data on this day, if so increment count by 1 and check the next day) where timestamp between jan and feb. Could you be a bit more

Re: If exists query.

2006-04-23 Thread Paul Halliday
I am doing queries that produce a table that looks something like this: Count | IP Address| First Seen| Last Seen | Days 5000 10.0.0.1 2005-12-102006-04-15 50* 6500 10.0.0.2 2006-04-012006-04-06 3** *So of the 5000 events count(*)

If exists query.

2006-04-21 Thread Paul Halliday
I am trying to formulate a query that will increment if a condition is true. For example, if I do a select (just let me know if there was data on this day, if so increment count by 1 and check the next day) where timestamp between jan and feb. Thanks. -- MySQL General Mailing List For list

Re: Determining if a trigger exists

2006-04-10 Thread Frank
if the CREATE DATABASE and CREATE TABLE have a IF NOT EXISTS functionality, why should the triggers be any different? Maybe this is just an oversight, maybe the CREATE TRIGGER should have a IF NOT EXISTS functionality also? or I'm just doing something very wrong. Maybe someone can point me

Re: Determining if a trigger exists

2006-04-07 Thread Adrian Co
Hi, Sorry if I wasn't very clear with my question. I was hoping to obtain the functionality such that I could do something similar to: CREATE TRIGGER IF NOT EXISTS Because I usually get a trigger already exists in my script. I might be missing something. The script basically does

Re: Determining if a trigger exists

2006-04-07 Thread sheeri kritzer
, you could try it yourself and see that it fails. -Sheeri On 4/7/06, Adrian Co [EMAIL PROTECTED] wrote: Hi, Sorry if I wasn't very clear with my question. I was hoping to obtain the functionality such that I could do something similar to: CREATE TRIGGER IF NOT EXISTS Because I usually

Re: Determining if a trigger exists

2006-04-07 Thread Adrian Co
and CREATE TABLE have a IF NOT EXISTS functionality, why should the triggers be any different? Maybe this is just an oversight, maybe the CREATE TRIGGER should have a IF NOT EXISTS functionality also? or I'm just doing something very wrong. Maybe someone can point me in the right direction

Determining if a trigger exists

2006-04-06 Thread Adrian Co
Hi, Whats the simplest way to determine if a trigger already exists? i.e. For tables you have: CREATE TABLE IF NOT EXISTS ... Is there a way to do CREATE TRIGGER IF NOT EXISTS I'm using MySQL 5.0 btw. Thanks! Regards, Adrian -- MySQL General Mailing List For list archives: http

RE: Determining if a trigger exists

2006-04-06 Thread Jim
: Determining if a trigger exists Hi, Whats the simplest way to determine if a trigger already exists? i.e. For tables you have: CREATE TABLE IF NOT EXISTS ... Is there a way to do CREATE TRIGGER IF NOT EXISTS I'm using MySQL 5.0 btw. Thanks! Regards, Adrian -- MySQL General Mailing List

RE: error 1016 : cant open ibd file even though it exists

2006-02-28 Thread mysql
From: Rithish Saralaya [EMAIL PROTECTED] Subject: RE: error 1016 : cant open ibd file even though it exists Hello Keith. The power outage was known before-hand, and the server was shutdown before the outage happened. The server was brought up once the power returned. So no UPs

Re: error 1016 : cant open ibd file even though it exists

2006-02-27 Thread Heikki Tuuri
Rithish, - Original Message - From: Rithish Saralaya [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Monday, February 27, 2006 7:06 AM Subject: RE: error 1016 : cant open ibd file even though it exists Heikki. I found the ibdata1 and ib_log files located in only '/var

RE: error 1016 : cant open ibd file even though it exists

2006-02-27 Thread Rithish Saralaya
] Sent: Saturday, February 25, 2006 8:13 PM To: mysql@lists.mysql.com Subject: RE: error 1016 : cant open ibd file even though it exists I do not use Innodb tables at the moment, so all this is pure speculation. Is/was the server connected to a UPS when the power failure happened? If so, did

RE: error 1016 : cant open ibd file even though it exists

2006-02-27 Thread Rithish Saralaya
it has to any db/table? Regards, Rithish. -Original Message- From: Heikki Tuuri [mailto:[EMAIL PROTECTED] Sent: Monday, February 27, 2006 1:54 PM To: mysql@lists.mysql.com Subject: Re: error 1016 : cant open ibd file even though it exists Rithish, - Original Message - From

RE: error 1016 : cant open ibd file even though it exists

2006-02-26 Thread Rithish Saralaya
: Re: error 1016 : cant open ibd file even though it exists Rithish, ok, then the most probable explanation is that someone had edited my.cnf earlier, when mysqld was running. When mysqld was restarted, it read the new my.cnf, and got confused. Please ask your sysadmins to scan the file system

RE: error 1016 : cant open ibd file even though it exists

2006-02-25 Thread Rithish Saralaya
, February 24, 2006 3:55 PM To: mysql@lists.mysql.com Subject: Re: error 1016 : cant open ibd file even though it exists Rithish, from the .err log we see that mysqld was shut down for 12 hours on Feb 19th. What did the sysadmins do during that time? There are two plausible explanations: 1

Re: error 1016 : cant open ibd file even though it exists

2006-02-25 Thread David Logan
it exists Rithish, from the .err log we see that mysqld was shut down for 12 hours on Feb 19th. What did the sysadmins do during that time? There are two plausible explanations: 1) they edited datadir in my.cnf to point to a different location ( /var/lib/mysql), or 2) they removed ibdata1

RE: error 1016 : cant open ibd file even though it exists

2006-02-25 Thread Rithish Saralaya
PROTECTED] Sent: Saturday, February 25, 2006 3:32 PM To: Rithish Saralaya Cc: mysql@lists.mysql.com Subject: Re: error 1016 : cant open ibd file even though it exists Hi Rithish, After reading Heikkis points, I am inclined to agree. Did your sysadmins change a filesystem during

Re: error 1016 : cant open ibd file even though it exists

2006-02-25 Thread Heikki Tuuri
Saralaya [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Saturday, February 25, 2006 12:14 PM Subject: RE: error 1016 : cant open ibd file even though it exists --=_NextPart_000_001D_01C63A22.BB0C91A0 Content-Type: text/plain; charset=Windows-1252 Content-Transfer-Encoding: 7bit

RE: error 1016 : cant open ibd file even though it exists

2006-02-25 Thread mysql
though it exists Hello David. There was supposed to be a power outage in our office that day. So the server was shut down. Finally when the power was back, the machine was plugged on. That's all. No file system change. Nothing. Regards, Rithish. -- MySQL General Mailing List For list

Re: error 1016 : cant open ibd file even though it exists

2006-02-24 Thread Heikki Tuuri
/order.php - Original Message - From: Rithish Saralaya [EMAIL PROTECTED] Newsgroups: mailing.database.myodbc Sent: Friday, February 24, 2006 6:55 AM Subject: RE: error 1016 : cant open ibd file even though it exists Hello. The tables were working perfectly fine a week back

RE: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Logan, David (SST - Adelaide)
- From: Rithish Saralaya [mailto:[EMAIL PROTECTED] Sent: Thursday, 23 February 2006 5:02 PM To: Logan, David (SST - Adelaide); MySQL general mailing list Subject: RE: error 1016 : cant open ibd file even though it exists Hello David. Thanks for the prompt response. The permissions were the first

Re: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Ady Wicaksono
- Adelaide); MySQL general mailing list Subject: RE: error 1016 : cant open ibd file even though it exists Hello David. Thanks for the prompt response. The permissions were the first thing that I checked when I got the error. In fact, I even tried giving 777 permissions on the .ibd files. No results

RE: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Rithish Saralaya
- From: Ady Wicaksono [mailto:[EMAIL PROTECTED] Sent: Thursday, February 23, 2006 5:50 PM To: Logan, David (SST - Adelaide) Cc: Rithish Saralaya; MySQL general mailing list Subject: Re: error 1016 : cant open ibd file even though it exists Try to help Please give us the ls -l result of this file, also

Re: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Heikki Tuuri
1016 : cant open ibd file even though it exists From: Rithish Saralaya rithish.saralaya () tallysolutions ! com Date: 2006-02-22 11:27:44 Message-ID: ANEAKJJGBMNHIAEBLIAIMEPCECAA.rithish.saralaya () tallysolutions ! com [Download message RAW] Hello. I get the following error when I try

Re: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread sheeri kritzer
' (errno: 1) However, I have noticed that both the .frm and the .ibd file exists for the table TBL_FORUM_MSG_BODY. Then why the error? I looked into the error log and it is as follows 060222 15:14:09 InnoDB error: Cannot find table test/TBL_FORUM_MSG_BODY from the internal data dictionary

RE: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Rithish Saralaya
the mysql is located. That's proper. -Original Message- From: sheeri kritzer [mailto:[EMAIL PROTECTED] Sent: Friday, February 24, 2006 3:22 AM To: Rithish Saralaya Cc: MySQL general mailing list Subject: Re: error 1016 : cant open ibd file even though it exists What are the permissions

RE: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread Rithish Saralaya
@lists.mysql.com Subject: Re: error 1016 : cant open ibd file even though it exists Rithish, the table definition does not exist in the ibdata file. You have the .frm file and the .ibd file, but that does not help if the table definition is not stored in the ibdata file. How did you end up

RE: error 1016 : cant open ibd file even though it exists

2006-02-23 Thread mysql
: To: MySQL general mailing list mysql@lists.mysql.com From: Rithish Saralaya [EMAIL PROTECTED] Subject: RE: error 1016 : cant open ibd file even though it exists Hello. The tables were working perfectly fine a week back. The database was created from a sql file generated through

error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
that both the .frm and the .ibd file exists for the table TBL_FORUM_MSG_BODY. Then why the error? I looked into the error log and it is as follows 060222 15:14:09 InnoDB error: Cannot find table test/TBL_FORUM_MSG_BODY from the internal data dictionary of InnoDB though the .frm file for the table exists

RE: error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Logan, David (SST - Adelaide)
[mailto:[EMAIL PROTECTED] Sent: Thursday, 23 February 2006 3:43 PM To: MySQL general mailing list Subject: error 1016 : cant open ibd file even though it exists Hello. I get the following error when I try to query a table in a particular database (test). The error is generated for all tables within

error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
that both the .frm and the .ibd file exists for the table TBL_FORUM_MSG_BODY. Then why the error? I looked into the error log and it is as follows 060222 15:14:09 InnoDB error: Cannot find table test/TBL_FORUM_MSG_BODY from the internal data dictionary of InnoDB though the .frm file for the table exists

RE: error 1016 : cant open ibd file even though it exists

2006-02-22 Thread Rithish Saralaya
PROTECTED] Sent: Thursday, February 23, 2006 10:42 AM To: Rithish Saralaya; MySQL general mailing list Subject: RE: error 1016 : cant open ibd file even though it exists Hi Rithish, Please check your ownership/permissions hambone ~ $ perror 1 OS error code 1: Not owner hambone ~ $ Regards

(mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams
Hi All, Having a bit of mysqldump trouble again. I've looked over the documentation (again) and can't seem to find the flag to make 'mysqldump' out put CREATE TABLE IF NOT EXISTS. Any ideas? Regards, Michael -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: (mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Jake Peavy
DROP TABLE IF NOT EXISTS? On 1/16/06, Michael Williams [EMAIL PROTECTED] wrote: Hi All, Having a bit of mysqldump trouble again. I've looked over the documentation (again) and can't seem to find the flag to make 'mysqldump' out put CREATE TABLE IF NOT EXISTS. Any ideas? Regards

Re: (mysqldump) CREATE TABLE IF NOT EXISTS. . .

2006-01-16 Thread Michael Williams
I appreciate the suggestion, but I'm not looking to drop anything. I only want it as a safety net in the event that the table doesn't already exist. I'm doing syncing of sorts, and I want the CREATE TABLE IF NOT EXISTS so as not to throw errors in the event that the table already exists

Record exists but not found - grrr

2005-10-27 Thread Wenca
Hi all, I've got a problem that I don't understand and that is driving me mad. I have a table 'tab_p' with this structure: nametype --- p_idmediumint(8) AUTOINCREMENT NOT NULL PRIMARY KEY d_idsmallint(5) NOT NULL namevarchar(50) NOT NULL

Re: Record exists but not found - grrr

2005-10-27 Thread Jigal van Hemert
Wenca wrote: SELECT * FROM tab_p WHERE d_id = 20602 AND name LIKE 'Machico' - no results Try it with ...AND `name` LIKE '%Machico%'; I have encountered it once when there were non printable characters in front of or after the text itself. Very frustrating! You can see what extra characters

Re: Record exists but not found - grrr

2005-10-27 Thread Wenca
had a similar situation in the past. Hope this helps, Paul -Original Message- From: Wenca [mailto:[EMAIL PROTECTED] Sent: 27 October 2005 10:56 To: mysql@lists.mysql.com Subject: Record exists but not found - grrr Hi all, I've got a problem that I don't understand

Detect if table exists from within MySQL?

2005-10-06 Thread Ryan Stille
I am converting some code from MSSQL to MySQL. In one place I need to have a conditional query depending on if a table exists or not. There are different versions of this application and the table only exists in some of them. Here is how it was done in MSSQL: IF OBJECT_ID('cfgbiz') IS NOT NULL

Re: Detect if table exists from within MySQL?

2005-10-06 Thread Peter Brawley
Ryan, I am converting some code from MSSQL to MySQL. In one place I need to have a conditional query depending on if a table exists or not. There are different versions of this application and the table only exists in some of them. Here is how it was done in MSSQL: If 'SHOW COLUMNS FROM

RE: Detect if table exists from within MySQL?

2005-10-06 Thread Ryan Stille
If 'SHOW COLUMNS FROM tablename' returns error 1146 (42S02), the table doesn't exist. This causes my application (ColdFusion) to throw an exception. If I have to, I could resort to doing another query in my application (SHOW TABLES) and seeing if my table was returned in that list. But I was

Re: Detect if table exists from within MySQL?

2005-10-06 Thread Keith Ivey
Ryan Stille wrote: If I have to, I could resort to doing another query in my application (SHOW TABLES) and seeing if my table was returned in that list. But I was hoping for a more elegant way to do it, within the single query. Maybe you could use SHOW TABLES LIKE 'your_table'; -- Keith

Re: Detect if table exists from within MySQL?

2005-10-06 Thread Jeff Smelser
On Thursday 06 October 2005 10:57 am, Ryan Stille wrote: I am converting some code from MSSQL to MySQL. In one place I need to have a conditional query depending on if a table exists or not. There are different versions of this application and the table only exists in some of them. Here

RE: Detect if table exists from within MySQL?

2005-10-06 Thread Ryan Stille
Maybe you could use SHOW TABLES LIKE 'your_table'; That's a great idea, I just tried it in several ways, like: IF EXISTS (SHOW TABLES LIKE 'cfgbiz') THEN SELECT siacnotifyto FROM cfgbiz ELSE SELECT '' as siacnotifyto END IF; -and- select IF((SHOW TABLES LIKE 'cfgbiz'),notifyto

Re: add a column if not exists

2005-09-27 Thread Gleb Paharenko
Hello. You can parse the output of 'SHOW CREATE TABLE' or 'SHOW COLUMNS'. See: http://dev.mysql.com/doc/mysql/en/show-columns.html http://dev.mysql.com/doc/mysql/en/show-create-table.html Claire Lee wrote: I want to check if a column exists in a table before I do an alter

Exists BUG in IN ?

2005-09-26 Thread Dyego Souza Dantas Leal
Hello Guys, I'm using the 5.0.12 version of MySQL PRO on AMD64 3000+ with 1 GB of ram and using the InnoDB Tables.. Here is my table: CREATE TABLE `svcs_filecontrol` ( `fc_id` int(10) unsigned NOT NULL auto_increment, `fc_us_id_lockby` int(10) unsigned default NULL, `fc_lbl_id` int(10)

add a column if not exists

2005-09-26 Thread Claire Lee
I want to check if a column exists in a table before I do an alter table to add it. How do I do this in mysql? Thanks. Claire __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL

Re: Exists BUG in IN ?

2005-09-26 Thread Michael Stassen
Dyego Souza Dantas Leal wrote: Hello Guys, I'm using the 5.0.12 version of MySQL PRO on AMD64 3000+ with 1 GB of ram and using the InnoDB Tables.. snip Here is the Select: mysql select f1.fc_package from svcs_filecontrol f1 where f1.fc_id in ( - *select max(f2.fc_id) from

Re: add a column if not exists

2005-09-26 Thread Peter Brawley
Claire, I want to check if a column exists in a table before I do an alter table to add it. How do I do this in mysql? Thanks. If you are using MySQL 5.0, query information_schema.columns (http://dev.mysql.com/doc/mysql/en/columns-table.html) for the table and column. Otherwise use SHOW

Re: add a column if not exists

2005-09-26 Thread Pooly
Hi, 2005/9/26, Peter Brawley [EMAIL PROTECTED]: Claire, I want to check if a column exists in a table before I do an alter table to add it. How do I do this in mysql? Thanks. other solution, do your query in all case and check for the return error (if any). mysql alter table board add

Re: EXISTS subquery optimization

2005-09-17 Thread Pooly
Hi, Now as expected it's an dependent subquery and makes use of the index on document_id. BUT: If we change the SELECT id in the subquery to SELECT document_id or SELECT 1, we get: *** 1. row *** [...] *** 2. row

EXISTS subquery optimization

2005-09-14 Thread Matthias Pigulla
Hi all, the manual says: If a subquery returns any rows at all, then EXISTS subquery is TRUE, and NOT EXISTS subquery is FALSE. ... Traditionally, an EXISTS subquery starts with SELECT *, but it could begin with SELECT 5 or SELECT column1 or anything at all. MySQL ignores the SELECT list

  1   2   3   4   >