From: Wagner Bianchi [mailto:wagnerbian...@yahoo.com.br] Sent: Monday, March 23, 2009 7:57 AM To: Jerry Schwartz Subject: Res: Error -1
Hi friend, You can use this, but, the -1 Error you got on the situation in you use InnoDB and it's crash. [JS] I'm not using InnoDB for this table, it needs a full-text index so it has to be MyISAM: Create Table: CREATE TABLE `memos` ( `note_id` int(11) NOT NULL AUTO_INCREMENT, `customer_id` int(11) DEFAULT NULL, `note_timestamp` datetime DEFAULT NULL, `note_text` text, PRIMARY KEY (`note_id`), KEY `customer_id` (`customer_id`), FULLTEXT KEY `note_text` (`note_text`) ) ENGINE=MyISAM AUTO_INCREMENT=102353 DEFAULT CHARSET=utf8 Curious, somebody know more about this question? Wagner Bianchi Diretor de Tecnologia - INFODBA C&T wagnerbian...@infodba.com.br - (31) 3272 - 0226 / 9114 - 7695 ________________________________________ De: Jerry Schwartz <jschwa...@the-infoshop.com> Para: MySql <mysql@lists.mysql.com> Enviadas: Sábado, 21 de Março de 2009 22:56:30 Assunto: Error -1 I'm running 5.1.31-community on WinXP. I'm getting ERROR 1030 (HY000): Got error -1 from storage engine from the following query: SELECT SQL_CALC_FOUND_ROWS customers.*, account.account_name, account.real_name AS `Sales Rep`, stage.stage_name, memos.note_text AS m_note_text FROM customers INNER JOIN account ON account.account_id = customers.account_id INNER JOIN stage ON customers.stage_id = stage.stage_id LEFT JOIN memos ON customers.customer_id = memos.customer_id AND (memos.note_id = (SELECT note_id FROM memos WHERE memos.customer_id=customers.customer_id AND (MATCH(memos.note_text) AGAINST ("frog")) ORDER BY note_timestamp DESC LIMIT 1) OR memos.note_id IS NULL) LIMIT 0,25; If I take out the MATCH term, the query works just fine. SELECT SQL_CALC_FOUND_ROWS customers.*, account.account_name, account.real_name AS `Sales Rep`, stage.stage_name, memos.note_text AS m_note_text FROM customers INNER JOIN account ON account.account_id = customers.account_id INNER JOIN stage ON customers.stage_id = stage.stage_id LEFT JOIN memos ON customers.customer_id = memos.customer_id AND (memos.note_id = (SELECT note_id FROM memos WHERE memos.customer_id=customers.customer_id ORDER BY note_timestamp DESC LIMIT 1) OR memos.note_id IS NULL) LIMIT 0,25; The error -1 isn't very helpful, does anyone have a clue? Perhaps I can't use MATCH in a JOIN condition? Regards, Jerry Schwartz The Infoshop by Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 860.674.8341 www.the-infoshop.com www.giiexpress.com www.etudes-marche.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=wagnerbian...@yahoo.com.br ________________________________________ Veja quais são os assuntos do momento no Yahoo! + Buscados: Top 10 - Celebridades - Música - Esportes -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org