is this a MySQL bug?
Hi, I keep getting error 1100 (table [table name(s) was not locked with LOCK TABLES) but I am definitely locking them with LOCK TABLES... here's examples of what i'm doing... i have 2 tables i'm trying to work with...jobs and mechanics i do lock tables jobs read everything seemed ok so then i do lock tables mechanics read again no errors so i guess it worked..now i'm expecting to have my 2 tables locked for read only. No I would try to query them with a JOIN but i keep getting the error so I tried querying each table indiviually but i still get the error: select * from jobs,mechanics where jobs.mech_id=mechanics.mech_id and status!='completed' error 1100 select * from jobs error 1100 select * from mechanics error 1100 unlock tables select * from jobs,mechanics where jobs.mech_id=mechanics.mech_id and status!='completed' SUCCESS! select * from jobs SUCCESS! select * from mechanics SUCCESS AGAIN! i have also tried locking the tables with: lock tables jobs mechanics read which seems to execute ok, but again when i try to query the tables i get error 1100. does all this indicate a bug in MySQL or am i doing something stupid? thanks for your help - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: is this a MySQL bug?
I knew i was doing something stupid :p I did actually look through the documentation but i had no luck. I also have a MySQL book (Core MySQL by Leon Atkinson) but I couldn't find anything in there to help me. Thanks for your help. On Thu, 2002-11-28 at 05:06, Keith C. Ivey wrote: On 28 Nov 2002, at 3:24, Chris Barnes wrote: i do lock tables jobs read everything seemed ok so then i do lock tables mechanics read again no errors so i guess it worked..now i'm expecting to have my 2 tables locked for read only. In the documentation it says (http://www.mysql.com/doc/en/LOCK_TABLES.html): All tables that are locked by the current thread are automatically unlocked when the thread issues another LOCK TABLES, or when the connection to the server is closed. So you have to lock the two tables in the same SQL statement. [snip] i have also tried locking the tables with: lock tables jobs mechanics read Look at the syntax for locking more than one table -- it uses commas: LOCK TABLES jobs READ, mechanics READ The way you're doing it, you seem to be locking 'jobs' with an alias of 'mechanics'. -- Keith C. Ivey [EMAIL PROTECTED] Tobacco Documents Online http://tobaccodocuments.org Phone 202-667-6653 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
lock statement
hi people, just a quick question. is there a way i can use the lock tables statement to lock all the tables in a database which out having to specify all tables individually? i dont really want to use a statement like: lock tables table1 read, table2 read table3 read, table4 read, table5 read, table6 read, table7 read, table8 read, table9 read, table10 read; something like lock tables * read; or lock * write; would be nice but i cant find anything about that in the mysql documentation. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: mysqldump on tables which use auto_increment
Hi, I have a database which a few tables which have a few fields set with auto_increment and i'm having alot of trouble restoring the backup because the backup recreates the table with the auto_increment field, but when it tries to enter the data back into the table it cant because it is trying to manually enter the value for the field with the auto_increment. here's a sample of the backup sql... CREATE TABLE ships ( ship_id bigint(20) unsigned NOT NULL auto_increment, ship_name varchar(20), ship_destroyed enum('Y','N') DEFAULT 'N' NOT NULL, character_name varchar(20) DEFAULT '' NOT NULL, password varchar(16) DEFAULT '' NOT NULL, now here's a sample of the data it will try to enter into the table # Dumping data for table 'ships' # LOCK TABLES ships WRITE; INSERT INTO ships VALUES (1,'WebMaster','N','WebMaster','admin@xx'); UNLOCK TABLES; if i try to restore the database from this data it always tells me there was an error because it is trying to insert a duplicate value. dos anyone know how to properly backup and restore a table with auto_increment fields? or am i on the completely wrong track here? any help appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
MySql table corruption...
Hi people, I'm new to the list. I'm writing because I've been having trouble with table corruption. I'm using isam tables and i've been using myisamchk under linux to check them. alot of the time it just reports that some of the tables were'nt closed properly so i repair them but after doing that i find that the tables are ruined. I read that the linux 2.2.14 kernel can be a problem with mysql but i'm running the 2.4.8 kernel. Also, I did backup the databases using mysqldump...but after tryign to restore by: mysql --user=whoever --password=whatever --host=whereever database_restore.txt i get errors...I think that when the backup was created bad data was written to the file. Is there supposed to be a minimum file size before your are supposed to run myisamchk, or is there something i should be running before i run myisamchk? can anyone shed some light? Thanx heaps. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MyODBC driver window keeps popping up...
Anybody know how to solve the Same Problem in Access 2K ? Cheers Chris = Original Message From Frank Hacker [EMAIL PROTECTED] = Hi Gert! Thanks for the very, very excellent tip - worked just great! Now I can start on the PHP coding :-)) Bye! Frank Hacker ([EMAIL PROTECTED]) EDV Abteilung / IT Dept. Gebr. Reinfurt Wuerzburg Miniaturkugellager Gneisenaustr. 10-11 97074 Wuerzburg Germany Tel.: +49 (0) 931 7952 354 Fax: +49 (0) 931 7952 300 Internet: www.grw.de -Ursprngliche Nachricht- Von: Hof, Gert van 't [SMTP:[EMAIL PROTECTED]] Gesendet am: Donnerstag, 22. Mrz 2001 08:26 An: 'Frank Hacker'; '[EMAIL PROTECTED]' Cc: '[EMAIL PROTECTED]' Betreff: RE: MyODBC driver window keeps popping up... Hi When i create a ODBC-DSN, there are fields where i can fill in a user name and password. When i filled these in, excel (and Delphi) don't ask for usernames/passwords. Regards Gert -Original Message- From: Frank Hacker [SMTP:[EMAIL PROTECTED]] Sent: Thursday, March 22, 2001 8:17 AM To:'[EMAIL PROTECTED]' Cc:'[EMAIL PROTECTED]' Subject: MyODBC driver window keeps popping up... Hi! How do I keep the MyODBC driver window (labeled "TDX mysql Driver connect") from being displayed when I connect to MySQL via ODBC? This behaviour makes it impossible to automate the task of updating a MySQL Database from an Access 97 Database via ODBC using a Macro in Access, since the window pops up and waits for someone to press the OK button before the macro can continue. I have checked the option for "don't prompt on connect" without success. I have also tried to pass "OPTION=16" along with the DSN-connect string, also without success. Is there any way to do this? Our setup: NT 4.0 SP5, mysql-3.23.35-win, myodbc-2.50.36-nt, MS-DAC 2.5, Access 97 SP2 We have an Access database that contains all the info to our technical drawings, which I would like to extract and display on a web-page in our intranet (LAMP) - I wasn't able to get ODBC under Linux to work, so I installed MySQL under NT and exported the Access tables to MySQL. These tables change constantly, so the export also must be performed at least daily, and most important, automatically at night. For this purpose I wrote a batch file like this: net stop mysql delete old mysql tables net start mysql call access with parameter /x macro-name The Access-macro has exactly 3 commands and looks like this (in German, since its German NT and Access -- hope that's not a problem :-)) Aktion: TransferDatenbank Transfertyp: Exportieren Datenbankformat: ODBC-Datenbank Datenbankname: ODBC;DSN=Zeichnungen;DB=Zeichnungen;SERVER=edv;PORT=;OPTION=16;STMT=;;TA BLE=documents Objekttyp: Tabelle Quelle: documents Ziel: documents Nur Struktur: Nein Aktion: TransferDatenbank Transfertyp: Exportieren Datenbankformat: ODBC-Datenbank Datenbankname: ODBC;DSN=Zeichnungen;DB=Zeichnungen;SERVER=edv;PORT=;OPTION=16;STMT=;;TA BLE=files Objekttyp: Tabelle Quelle: files Ziel: files Nur Struktur: Nein Aktion: Verlassen Optionen: Beenden Everything actually works surprisingly well, except for this problem with the popup window... it would be really great if there was a solution for this... Thanks in advance! Ciau... -- Frank Hacker ([EMAIL PROTECTED]) EDV Abteilung / IT Dept. Gebr. Reinfurt Wuerzburg Miniaturkugellager Gneisenaustr. 10-11 97074 Wuerzburg Germany Tel.: +49 (0) 931 7952 354 Fax: +49 (0) 931 7952 300 Internet: www.grw.de - Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail [EMAIL PROTECTED] instead. - Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail [EMAIL PROTECTED] instead. This message is sent in confidence for the addressee only. It may contain privileged information. The contents are not to be disclosed to anyone other than the addressee. Unauthorised recipients are requested to preserve this confidentiality and to advise us of any errors in transmission. Thank you. Thank you. - Before posting, please check: