Join mysticism
Hi, All. Help me to understand why such different speed of two queries. These queries do the same and differ only in superfluous information (marked by red). Speed of the first is 0.37 second. Speed of the latter is 3.95 second. The first: SELECT DATE_FORMAT(visits_1.date_time_visit, '%Y-%m-%d') AS dt, Count(DISTINCT visits_1.id_visitor) AS cnt, visits_1.id_visitor, visits_1.id_visit, visits_2.id_visitor, visits_2.id_visit, visits_1.visit_number, visits_2.visit_number FROM visits AS visits_1 INNER JOIN visits AS visits_2 USING(id_visitor) WHERE visits_1.id_visitor=visits_2.id_visitor AND visits_1.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_2.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_1.visit_number=1 AND visits_2.visit_number=2 AND UNIX_TIMESTAMP(visits_2.date_time_visit)-UNIX_TIMESTAMP(visits_1.date_time_visit) = 3600 GROUP BY dt LIMIT 0,50 The latter: SELECT DATE_FORMAT(visits_1.date_time_visit, '%Y-%m-%d') AS dt, Count(DISTINCT visits_1.id_visitor) AS cnt, visits_1.id_visitor, visits_1.id_visit, visits_2.id_visitor, visits_2.id_visit, visits_1.visit_number, visits_2.visit_number FROM visits AS visits_1 INNER JOIN visits AS visits_2 USING(id_visitor) WHERE visits_1.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_2.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_1.visit_number=1 AND visits_2.visit_number=2 AND UNIX_TIMESTAMP(visits_2.date_time_visit)-UNIX_TIMESTAMP(visits_1.date_time_visit) = 3600 GROUP BY dt LIMIT 0,50 Best Regards. Nick.
Grant/Revoke dialogue doesn't open
skick writes: I am havving the same problem. I even tried compiling a version. If it is a window manager problem then how do I fix it. It seems like it should work wiith both the kde 2.0 window manager and the enlightenment window manager that is part on gnome. Hi! Please try to describe in detail exactly what is happening when you start GRANT dialogue. I would like to be able to repeat it. I am using E, but my wife is using KDE 2.0.1. Regards, Sinisa I came across this discussion from April 2001 on the archives, but nothing more recent. I also have encountered the problem, and thought I could submit a bit more information. OS - Linux 2.4.3 XFree - 4.0.2 KDE- 2.1.1 The problem is not exactly that the grant/revoke dialogue won't open, it opens but only shows (in my case) the first 'line' of the dialogue having the Grant checkbox and username text box. I can minimise and restore the window; maximising causes it to widen to screen width but the height remains the same. The only resizing that can be done is horizontal. Please query me if any further info is needed. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA This is my assessment, said Tom irately. - 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: Grant/Revoke dialogue doesn't open
On Tue, 26 Jun 2001 16:21, [EMAIL PROTECTED] wrote: Your message cannot be posted because it appears to be either spam or simply off topic to our filter. To bypass the filter you must include one of the following words in your message: database,sql,query,table If you just reply to this message, and include the entire text of it in the reply, your reply will go through. However, you should first review the text of the message to make sure it has something to do with MySQL. You have written the following: skick writes: I am havving the same problem. I even tried compiling a version. If it is a window manager problem then how do I fix it. It seems like it should work wiith both the kde 2.0 window manager and the enlightenment window manager that is part on gnome. Hi! Please try to describe in detail exactly what is happening when you start GRANT dialogue. I would like to be able to repeat it. I am using E, but my wife is using KDE 2.0.1. Regards, Sinisa I came across this discussion from April 2001 on the archives, but nothing more recent. I also have encountered the problem, and thought I could submit a bit more information. OS - Linux 2.4.3 XFree - 4.0.2 KDE- 2.1.1 The problem is not exactly that the grant/revoke dialogue won't open, it opens but only shows (in my case) the first 'line' of the dialogue having the Grant checkbox and username text box. I can minimise and restore the window; maximising causes it to widen to screen width but the height remains the same. The only resizing that can be done is horizontal. Please let me know if any further info is needed. Forgot - mysqlgui 1.7.5 (according to the download, but help shows 1.7.4) and the problem also exists in the table hierarchy window -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA The Definition of an Upgrade: Take old bugs out, put new ones in. - 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
[Q] why I get this message
Hi! Last time I sometimes get this messages: ERROR 1049: Unknown database 'stat Database exist and I put many records to tables in this DB. But sometimes I get this message. This DB have many tables, now ~730. Why I get this messages. Can I fix this? PS OS - FreeBSD 4.3-STABLE max open file - 4136 mysql versions 3.23.25-beta Thanks. __ Andrey - 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 ++ api / installation
hi everybody, i have a problem with installation of mysql ++ api 1.7.9. os: sun solaris 5.6 mysql version 3.23.33 after unpacking the archive with tar, autorun and autoconf i started configure. everything was working fine , but make gave me the following message: ### make all-recursive Making all in sqlplusint mksh: Fatal error in reader: = missing from replacement macro reference Current working directory /files2/mysql/mysql++-1.7.9/sqlplusint *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /files2/mysql/mysql++-1.7.9 *** Error code 1 make: Fatal error: Command failed for target `all-recursive-am' # does anybody knows what i made wrong? thanks peter volke
RE: runnning my sql with windows98 and pws
hiya, I've had exactly the setup you describe running on a laptop, (I've since switched to nt / linux ), download mysql,myodbc, and optionally mysqlfront. Just run the setup programs for mysql and myodbc (very easy), and you are all set up. If you create a odbc connection for you database you can access it from asp just like any other database. The only problem I had with win98 , was that I found the system hung if I didnt shutdown mysql before I shutdown the machine. but it was perfectly stable other than that. -Original Message- From: lipp maimone [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 2:12 AM To: [EMAIL PROTECTED] Subject: runnning my sql with windows98 and pws is someone abble to tell me how can i do for running an sql database with windows98 without crashing my systeme? Also, using asp ( activex server page ), is it possible with mysql version3,23? - 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: Join mysticism
Nick, What happens to the time if you run the following on your database: SELECT DATE_FORMAT(visits_1.date_time_visit, '%Y-%m-%d') AS dt, Count(DISTINCT visits_1.id_visitor) AS cnt, visits_1.id_visitor, visits_1.id_visit, visits_2.id_visitor, visits_2.id_visit, visits_1.visit_number, visits_2.visit_number FROM visits AS visits_1, visits AS visits_2 WHERE visits_1.id_visitor=visits_2.id_visitor AND visits_1.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_2.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_1.visit_number=1 AND visits_2.visit_number=2 AND UNIX_TIMESTAMP(visits_2.date_time_visit)-UNIX_TIMESTAMP(visits_1.date_time_v isit) = 3600 GROUP BY dt LIMIT 0,50 Just interested to know, Bruce -Original Message- From: Nick Kostirya [mailto:[EMAIL PROTECTED]] Sent: Tue, 26 June 2001 08:39 To: [EMAIL PROTECTED] Subject: Join mysticism Hi, All. Help me to understand why such different speed of two queries. These queries do the same and differ only in superfluous information (marked by red). Speed of the first is 0.37 second. Speed of the latter is 3.95 second. The first: SELECT DATE_FORMAT(visits_1.date_time_visit, '%Y-%m-%d') AS dt, Count(DISTINCT visits_1.id_visitor) AS cnt, visits_1.id_visitor, visits_1.id_visit, visits_2.id_visitor, visits_2.id_visit, visits_1.visit_number, visits_2.visit_number FROM visits AS visits_1 INNER JOIN visits AS visits_2 USING(id_visitor) WHERE visits_1.id_visitor=visits_2.id_visitor AND visits_1.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_2.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_1.visit_number=1 AND visits_2.visit_number=2 AND UNIX_TIMESTAMP(visits_2.date_time_visit)-UNIX_TIMESTAMP(visits_1.date_time_v isit) = 3600 GROUP BY dt LIMIT 0,50 The latter: SELECT DATE_FORMAT(visits_1.date_time_visit, '%Y-%m-%d') AS dt, Count(DISTINCT visits_1.id_visitor) AS cnt, visits_1.id_visitor, visits_1.id_visit, visits_2.id_visitor, visits_2.id_visit, visits_1.visit_number, visits_2.visit_number FROM visits AS visits_1 INNER JOIN visits AS visits_2 USING(id_visitor) WHERE visits_1.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_2.date_time_visit BETWEEN '2001-05-01' AND '2001-06-30' AND visits_1.visit_number=1 AND visits_2.visit_number=2 AND UNIX_TIMESTAMP(visits_2.date_time_visit)-UNIX_TIMESTAMP(visits_1.date_time_v isit) = 3600 GROUP BY dt LIMIT 0,50 Best Regards. Nick. - 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 language
hello I am engeneer and i use mysql . can you help me please in this questions: 1- tell me what is the language(arabic,french,english...) of the mysql database data. 2- can we create a database that contain melange of arabic and latin data if it is possible , how? THANKS from:hayet - 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: mysql ++ api / installation
Hi, Even i am getting the following error while doing ./configure: os: solaris 8 sparc mysql: 3.23.39 /configure loading cache ./config.cache checking host system type... sparc-sun-solaris2.8 checking target system type... sparc-sun-solaris2.8 checking build system type... sparc-sun-solaris2.8 checking for a BSD compatible install... ./install-sh -c checking whether build environment is sane... yes checking whether make sets ${MAKE}... (cached) yes checking for working aclocal... found checking for working autoconf... found checking for working automake... found checking for working autoheader... found checking for working makeinfo... missing checking whether to enable maintainer-specific portions of Makefiles... no checking whether build environment is sane... yes checking whether make sets ${MAKE}... (cached) yes checking for gawk... (cached) nawk checking for gcc... (cached) gcc checking whether the C compiler (gcc ) works... yes checking whether the C compiler (gcc ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking for c++... (cached) c++ checking whether the C++ compiler (c++ ) works... yes checking whether the C++ compiler (c++ ) is a cross-compiler... yes checking whether we are using GNU C++... (cached) yes checking whether c++ accepts -g... (cached) yes checking how to run the C preprocessor... (cached) gcc -E checking for ranlib... (cached) : checking for ld used by GCC... (cached) /usr/ccs/bin/ld checking if the linker (/usr/ccs/bin/ld) is GNU ld... (cached) no checking for BSD-compatible nm... (cached) /usr/ccs/bin/nm -p checking whether ln -s works... (cached) yes checking for object suffix... o checking for executable suffix... no checking for gcc option to produce PIC... -fPIC checking if gcc PIC flag -fPIC works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.lo... yes checking if gcc supports -fno-rtti -fno-exceptions ... yes checking if gcc static flag -static works... -static checking if the linker (/usr/ccs/bin/ld) is GNU ld... no checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes checking command to parse /usr/ccs/bin/nm -p output... ok checking how to hardcode library paths into programs... immediate checking for /usr/ccs/bin/ld option to reload object files... -r checking dynamic linker characteristics... solaris2.8 ld.so checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for objdir... .libs creating libtool loading cache ./config.cache checking for a BSD compatible install... ./install-sh -c checking for bison... no checking for byacc... no checking for pdftex... no checking return type of sprintf... configure: error: can not run test program while cross compiling # -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Volke Sent: 26 June 2001 09:18 To: [EMAIL PROTECTED] Subject: mysql ++ api / installation hi everybody, i have a problem with installation of mysql ++ api 1.7.9. os: sun solaris 5.6 mysql version 3.23.33 after unpacking the archive with tar, autorun and autoconf i started configure. everything was working fine , but make gave me the following message: ### make all-recursive Making all in sqlplusint mksh: Fatal error in reader: = missing from replacement macro reference Current working directory /files2/mysql/mysql++-1.7.9/sqlplusint *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /files2/mysql/mysql++-1.7.9 *** Error code 1 make: Fatal error: Command failed for target `all-recursive-am' # does anybody knows what i made wrong? thanks peter volke _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Full text search gotchas
We're having quite a lot of difficulty with MySQL's fulltext search. The problem is that it does partial matches. E.g., john matches johnson. Thus a match of author against dickens takes about 0.09 seconds with a 700,000 record table, but a match of a shorter word takes a good deal longer - a four-letter word takes several seconds. Does anyone know whether it's possible to change this so substring matches (such as john against johnson) are NOT made? (Perhaps someone has a patch or a suggestion as to how to make this work.) Also, having incidentally changed ftdefs.h to match 3-letter words, is it now necessary to rebuild the fulltext indexes? = Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - 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: Couldn't select database
hey bob, thanks for getting back to me - here's the full set up i have a pc running windows98, apache, php and mysql. it sits on our ethernet network and i connect to it via my mac using the ip address i have set up in the network control panel on the pc. i use the mac for building and the pc for web serving/ testing. first error to report: when i start up from the command line, change into the mysql/bin directory and type: mysqld --standalone i get the error 'can't initialise InnoDB as 'innodb_data_file_path' is not set'. however, this doesn't seem to effect the general running of mysql. i created a data base with the mysqladmin programme called 'test'. i then create a host, user and password by typing the following at the mysql prompt: use mysql insert into user (host, user, password) values ('192.168.254.204', 'jake', password('twentyeight'); i then exited and used the mysqladmin to flush-privileges and tried to connect to the database using a simple php page which checks the connection and then use's it to connect to the test database. this all works. then i created a 2nd database called 'guest' to start developing a guestbook mysql backend with a php front end. when i try to connect to this using the same host, user, password my php test script seems to connect and cant find or connect to the database. from what i have read and the responses i have had, it seems you have to re-enable the host, user and password for the new databases you create but the code that people are kindly offering up seems to have different commands in it and to be truthful my skills are not advanced enough to full understand how to enter it correctly. any more info that people can chuck my way would be great. cheers, jake on 25/6/01 4:03 pm, R Talbot at [EMAIL PROTECTED] wrote: Hi Jake, Your problem appears similar to a problem I had but... you aren't providing quite enough information.. Are you working as a user on the same local host or are connecting across a network? To eliminate a MySQL problem ( so you can concentrate your efforts on PHP code) try to connect directly from the command line with MySQL as follows.. #root$ mysql yourdatabasename -h hostname -u username -p password You can eliminate -h and -p if your on the same machine without password. See if this will connect.. BOb T 28 23a great queen street london wc2b 5bb t 020 7404 4828 f 0870 164 3109 [EMAIL PROTECTED] m 07931 507 442 - 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
DISTINCT AND NON DISTINCT #2
Hi All, I've been reading up on how to do joins on the mysql site. Is there not an inverse function for DISTINCT, so that I can pull out duplicate data as opposed to DISTINCT data...or will I have to get this information by using joins? Thanks very much for your help. Anna
RE: DISTINCT AND NON DISTINCT #2
Your question has been answered already. http://marc.theaimsgroup.com/?l=mysqlm=99348999221821w=2 Hi All, I've been reading up on how to do joins on the mysql site. Is there not an inverse function for DISTINCT, so that I can pull out duplicate data as opposed to DISTINCT data...or will I have to get this information by using joins? - 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
Tables exceeding 2gb
Hi, I have a Linux machine (Linux cartman 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown) that is running MySQL 3.23.38-log and now I have a table that is getting VERY near to the ext2 filesystem limitation of 2gb. Exact size of the table is: 2039867196 :) So my question is. What happens? Does mysql write into another file and automatically merge them on the fly or does the table stop or what? Also what suggestions do you have concerning this matter? regards, Gudmundur
HELP NEEDED: Problems with SELECT in combination with HAVING
Hello there - I have this weird problem using MySql (version 3.23.39). It seems that MySql interpretation of a SELECT statment using HAVING is completely random. I have a table called RobotRun which stores information about when a robot has been running (start, stop and the id of the robot). This translates to columns: runId (primary key), robotId (the id of the robot), startTime and endTime. A robot can run several times during its life time, thus several records will appear in RobotRun for the same robotId, however, each row will always have a unique runId. The purpose of the SQL is to produce one RobotRun row for each robot, with the added restriction that it is only the row with the newest startTime value that gets selected. Now if I do the following SQL things start to get strange: SELECT robotId, startTime, max(startTime) as crit FROM RobotRun WHERE startTime = '2001-06-26 00:00:00' AND endTime IS NOT NULL GROUP BY robotId HAVING startTime = crit This query produces 321 rows. Setting the startTime to '2001-06-25 00:00:00' produces 707 rows, which is correct and expected since the input set is larger. NOW: Setting the startTime to '2001-06-24 00:00:00' produces 21 rows What is going on. I cannot see how this is possible. The input set is only getting larger. The number of rows involved in the table is in the vicinity of 5. The theoretical maximum number of rows produced from the SQL is in the neighbourhood of 5000 rows. That shouldn't be a problem. I have also tried the following statement with the same result (problem): SELECT robotId, startTime FROM RobotRun WHERE startTime = '2001-06-26 00:00:00' AND endTime IS NOT NULL GROUP BY robotId HAVING startTime = max(startTime) Any help would be appreciated. Regards Thomas Koch - 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: Full text search gotchas
Hello Matthew I would be quite interested to know how you managed to make a partial search. I built a search engine recently using fulltext, and partial searches would never work. Say I type in child, I would never get any results with children. This is quite weird since you seem to want it the way I had my search, but I didnt change any of the settings (left everything at default), and still had only exact matches in the output. If you find out how to change it either way, please let me know. I thought it would not be possible to use partial searches. Cheers, Nessi *amazed* ;) PS: Maybe its coz my database was very small? Only had about 200 entries when I started off? At 13:11 26/06/01 , you wrote: We're having quite a lot of difficulty with MySQL's fulltext search. The problem is that it does partial matches. E.g., john matches johnson. Thus a match of author against dickens takes about 0.09 seconds with a 700,000 record table, but a match of a shorter word takes a good deal longer - a four-letter word takes several seconds. Does anyone know whether it's possible to change this so substring matches (such as john against johnson) are NOT made? (Perhaps someone has a patch or a suggestion as to how to make this work.) Also, having incidentally changed ftdefs.h to match 3-letter words, is it now necessary to rebuild the fulltext indexes? = Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - 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 - 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
auto-increment sequence question
Hello everybody, I thing, that I have a problem that needs a sequence and that auto-increment can't do the job this time. I already consulted the manual and the mailarchive. I saw several different proposals, now I'm a bit confused and don't know exactly what the rigth way is to do it. Could somebody please clarify the following? We are using ISAM tables on mysql 3.22.32. We have an id-column but the id will be generated out of two different ranges. Example: all VIP-customers will get an id from 1000- and normal customers from 1-999. So, I think the only way to solve this is a sequence table. Lets take a single row, integer value for holding the sequence: CREATE TABLE sequence( id int4; ); My question is this: Is this the best way to get and evalute the sequence? LOCK TABLES sequence WRITE; UPDATE sequence SET id=id+1; SELECT id FROM sequence; UNLOCK TABLES; Thanks Gunnar von Boehn - 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: Full text search gotchas
If you searched for '% john %' - note the spaces, you would not find 'johnson' etc.. -Original Message- From: Matthew Brealey [mailto:[EMAIL PROTECTED]] Sent: Tue, 26 June 2001 11:29 To: [EMAIL PROTECTED] Subject: Full text search gotchas We're having quite a lot of difficulty with MySQL's fulltext search. The problem is that it does partial matches. E.g., john matches johnson. Thus a match of author against dickens takes about 0.09 seconds with a 700,000 record table, but a match of a shorter word takes a good deal longer - a four-letter word takes several seconds. Does anyone know whether it's possible to change this so substring matches (such as john against johnson) are NOT made? (Perhaps someone has a patch or a suggestion as to how to make this work.) Also, having incidentally changed ftdefs.h to match 3-letter words, is it now necessary to rebuild the fulltext indexes? = Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - 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 - 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: Full text search gotchas
At 13:53 +0200 2001-06-26, Bruce Stewart wrote: If you searched for '% john %' - note the spaces, you would not find 'johnson' etc.. *Sigh* Since when do wildcards work with the fulltext index? Besides, there are characters beside a space wich can delimit words. Three examples: Commas. Line breaks. The start of the actual data. If you really want words, use rlike and \...\ (assuming that MySQL can do egrep-like escapes). But it'll be dirt slow compared to the fulltext index. -- Matthias Urlichs - 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: Full text search gotchas
Hello, thanks for your reply. I was wondering...I thought the LIKE function is only for single words? I have to admit I never tested it and started right off with fulltext option. So would following work then... Lets assume one entry in somefield is: The children are playing on the play-ground and I want to search for it using LIKE: SELECT * FROM yourtable WHERE somefield LIKE '%child%'; Would that then give me above entry in the output?!? Sorry if this is a stupid question, its just that I understood it from the manual that you can only search for a word not a text with LIKE. Cheers, Nessi At 13:13 26/06/01 , you wrote: Partial searches can be done with 'LIKE', i.e.: SELECT * FROM yourtable WHERE somefield LIKE '%searchstring%' The '%' is MySQLs wildcard here, so if you only want strings starting with your searchstring, use 'searchstring%' Regards, Sebastiaan J.A. Kamp Hello Matthew I would be quite interested to know how you managed to make a partial search. I built a search engine recently using fulltext, and partial searches would never work. Say I type in child, I would never get any results with children. This is quite weird since you seem to want it the way I had my search, but I didnt change any of the settings (left everything at default), and still had only exact matches in the output. If you find out how to change it either way, please let me know. I thought it would not be possible to use partial searches. Cheers, Nessi *amazed* ;) PS: Maybe its coz my database was very small? Only had about 200 entries when I started off? At 13:11 26/06/01 , you wrote: We're having quite a lot of difficulty with MySQL's fulltext search. The problem is that it does partial matches. E.g., john matches johnson. Thus a match of author against dickens takes about 0.09 seconds with a 700,000 record table, but a match of a shorter word takes a good deal longer - a four-letter word takes several seconds. Does anyone know whether it's possible to change this so substring matches (such as john against johnson) are NOT made? (Perhaps someone has a patch or a suggestion as to how to make this work.) Also, having incidentally changed ftdefs.h to match 3-letter words, is it now necessary to rebuild the fulltext indexes? = Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - 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 - 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 - 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 - 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: Full text search gotchas
mysql select * from test; +---+---+ | a | b | +---+---+ | 1 | The children are playing on the play-ground | | 2 | And some other sentence too | | 3 | Just for testing purposes | | 4 | Even though I do not like children, I will mention them once more | +---+---+ mysql select * from test where b LIKE '%child%'; +---+---+ | a | b | +---+---+ | 1 | The children are playing on the play-ground | | 4 | Even though I do not like children, I will mention them once more | +---+---+ The search can *NOT* be done on a 'fulltext' index, though... From: Nessi [EMAIL PROTECTED] To: Sebastiaan J.A. Kamp [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 2:31 PM Subject: Re: Full text search gotchas Hello, thanks for your reply. I was wondering...I thought the LIKE function is only for single words? I have to admit I never tested it and started right off with fulltext option. So would following work then... Lets assume one entry in somefield is: The children are playing on the play-ground and I want to search for it using LIKE: SELECT * FROM yourtable WHERE somefield LIKE '%child%'; Would that then give me above entry in the output?!?
Re: Grant/Revoke dialogue doesn't open
David Robley writes: I came across this discussion from April 2001 on the archives, but nothing more recent. I also have encountered the problem, and thought I could submit a bit more information. OS - Linux 2.4.3 XFree - 4.0.2 KDE- 2.1.1 The problem is not exactly that the grant/revoke dialogue won't open, it opens but only shows (in my case) the first 'line' of the dialogue having the Grant checkbox and username text box. I can minimise and restore the window; maximising causes it to widen to screen width but the height remains the same. The only resizing that can be done is horizontal. Please query me if any further info is needed. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Many FLTK applications, including mysqlgui have problems under KDE 2.x.x. Try changing settings in KDE Window Manager or temproarily use other window manager with KDE. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - 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: mysql ++ api / installation
Peter Volke writes: hi everybody, i have a problem with installation of mysql ++ api 1.7.9. os: sun solaris 5.6 mysql version 3.23.33 after unpacking the archive with tar, autorun and autoconf i started configure. everything was working fine , but make gave me the following message: ### make all-recursive Making all in sqlplusint mksh: Fatal error in reader: = missing from replacement macro reference Current working directory /files2/mysql/mysql++-1.7.9/sqlplusint *** Error code 1 make: Fatal error: Command failed for target `all-recursive' Current working directory /files2/mysql/mysql++-1.7.9 *** Error code 1 make: Fatal error: Command failed for target `all-recursive-am' # does anybody knows what i made wrong? thanks peter volke Hi! Several problems are possible. First you should use GNU tar and GNU make. Second, you should use g++ 2.95.2 or 2.95.3. Next, you should have autoconf and automake and run things like this: automake (ignore warnings) autoconf ./configure make -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: MySQLGUI Issue
[EMAIL PROTECTED] writes: Any idea when we'll be able to get our grubby little paws on VCC? I was trying out mysqlgui last night, and i found it did'nt add much to using the command line client, So i'd be interested to see where you are going with it. Thanks Sean Regarding mysqlgui, first you can do much more then with text version. For example, there are custom input forms. Read all documentation that came with mysqlgui. Regarding VCC it will be in few months. -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - 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: bad magic number, fire your magician error
On Mon, Jun 25, 2001 at 06:52:34PM +, patrick ward wrote: Hello Mr. Ziegler, I'm sorry if I'm intruding and promise not to do so again without your consent but our db replication has come to a grinding halt with the error 'bad magic number, fire your magician'. I'm at my wits end and I was hoping you might be able to help being that you posted a similar error on deja(now google). I have not yet resolved this issue, nor have I received any useful response from my posted requests for assistance. I'm mysql newbie (with hordes of theoretical knowledge but very little practical) and I've been recently assigned to find out what's causing our DB replication to fail and a launch an error like 'bad magic number'. I I have been a mysql user for 3 years, but am just now trying to get replication to work. followed the news groups regarding the error but found nothing in the way of a solution. ditto I've also read through the documentation at the MySql site and found nothing of use although I may have overlooked something. ditto I noticed you posted a similar problem to the newsgroups and I'm wondering if you found a solution. If so, I was hoping you might share it with me or direct me to a resource that might help. Will do, likewise if you find the answer, please share it with me. Some details, We're running, OS: Redhat 7.1. Debian testing Mysql version: 3.23.39 3.23.36 The error messages: 010625 12:25:55 Error reading packet from server: Binlog has bad magic number, fire your magician (read_errno 0,server_errno=65535) 010625 12:26:55 Slave: Failed reading log event, reconnecting to retry, log 'db-bin.143' position 20054 010625 12:26:55 Slave: reconnected to master '[EMAIL PROTECTED]:3306',replication resumed in log 'db-bin.143' at position 20054 Again, any help you can provide will be immensely appreciated. Thanks for you time and have a great day. Sincerely, Patrick Ward Jr Programmer/DB Administrator. _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. -- [EMAIL PROTECTED] (Jim Ziegler) - 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: auto-increment sequence question
At 13:49 +0200 2001-06-26, Gunnar von Boehn wrote: Lets take a single row, integer value for holding the sequence: CREATE TABLE sequence( id int4; ); That works, though I would use a single table for all sequences, not a new table per sequence. The other solution would be to do check the table itself what the maximum is: LOCK tables customer WRITE SELECT MAX(id) FORM customer WHERE id 1; ## your first normal customer INSERT INTO customer SET id=#new_id#, ... UNLOCK TABLES though MySQL's optimizer doesn't understand how to do find a ranged maximum by checking the index on the ID, so it's not a fast solution at present. = Hello MySQL developers: Please add that. Same for the equivalent ... ORDER BY id DESC LIMIT 1 -- Matthias Urlichs - 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 mysql-unsubscribe-##L=##[EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
full outer join?
According to the MySQL documentation, it doesn't currently support full outer joins and won't do in the immediate future. Does anyone have any suggestions for a workaround? I need to join three tables, only one of which has a common identifier with the others, and produce a result which shows not only the matching information (eg, where A.first_id = B.first_id and A.second_id = C.second_id), but also find any rows in either B or C that don't have a matching row in A, as well as any rows in A that don't match either B or C. Starting with A, I can easily show rows that don't have a corresponding match in B or C by means of a left join, but I can't work out how to get the reverse information in the same select. Any ideas? Or am I missing something obvious? Mark -- With sufficient thrust, pigs fly just fine. From RFC1925 - 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
Sever hangs after ...
Hi, what does mean following ... mysql show processlist; ++--+---+--++---+-+--+ | Id | User | Host | db | Command| Time | State | Info | ++--+---+--++---+-+--+ | 5 | | | autocz | Delayed_insert | 1 | Waiting on cond | dt | | 12 | | | abanners | Delayed_insert | 1 | Waiting on cond | statistics | | 18 | | | formule1 | Delayed_insert | 3 | Waiting on cond | pristup | | 9405 | | | carnext | Delayed_insert | 6863 | Waiting on cond | dailytraffic | | 10782 | | | auto_cz | Delayed_insert | 18453 | Waiting on cond | obrazky_stat | | 277825 | | | autonews | Delayed_insert | 67010 | Waiting on cond | pristup | | 277826 | | | autonews | Delayed_insert | 68166 | Waiting on cond | obrazky_stat | | 314346 | | | formule1 | Delayed_insert | 56880 | Waiting on cond | obrazky_stat | | 350836 | root | localhost | auto_cz | Sleep | 189 | NULL| NULL | | 361247 | root | localhost | auto_cz | Sleep | 1910 | NULL| NULL | | 361471 | root | localhost | auto_cz | Sleep | 1919 | NULL| NULL | | 364842 | root | localhost | auto_cz | Sleep | 291 | NULL| NULL | | 365388 | root | localhost | auto_cz | Sleep | 184 | NULL| NULL | | 365940 | root | localhost | auto_cz | Sleep | 151 | NULL| NULL | | 365950 | root | localhost | auto_cz | Sleep | 67| NULL| NULL | | 367387 | root | localhost | auto_cz | Sleep | 1126 | NULL| NULL | | 367567 | root | localhost | auto_cz | Sleep | 1248 | NULL| NULL | | 367903 | root | localhost | auto_cz | Sleep | 474 | NULL| NULL | | 368390 | root | localhost | auto_cz | Sleep | 869 | NULL| NULL | | 368810 | root | localhost | auto_cz | Sleep | 2010 | NULL| NULL | | 368924 | root | localhost | auto_cz | Sleep | 736 | NULL| NULL | | 368995 | root | localhost | auto_cz | Sleep | 119 | NULL| NULL | | 370074 | root | localhost | auto_cz | Sleep | 301 | NULL| NULL | | 370141 | root | localhost | auto_cz | Sleep | 805 | NULL| NULL | | 370532 | root | localhost | auto_cz | Sleep | 796 | NULL| NULL | | 370613 | root | localhost | auto_cz | Sleep | 464 | NULL| NULL | | 370677 | root | localhost | auto_cz | Sleep | 452 | NULL| NULL | | 371171 | root | localhost | auto_cz | Sleep | 92| NULL| NULL | | 371216 | root | localhost | auto_cz | Sleep | 1557 | NULL| NULL | cut and after while server goues to hell ... Server status is mysql status -- mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686) Connection id: 456292 Current database: Current user: root@localhost Server version 3.22.32 Protocol version10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 1 day 17 hours 5 min 22 sec Threads: 102 Questions: 9955492 Slow queries: 4 Opens: 39241 Flush tables: 1 Open tables: 63 -- TIA, Mirek Novak - 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: Sever hangs after ...
Ok Each Status ID is a thread and you can kill them with KILL "thredidnumber". Delayed insert is just a sql insert command that has low priority. Sleep is a thread that is kept open incase you would like to use it agene. Question: How many thread do you allow on your set-up? You have hit 102 threads and have had 4 questions that have been over the long question time set One thing to look for the pconnects over connects in your programs! Hope this helps? Simon -Original Message- From: Mirek Novak [mailto:[EMAIL PROTECTED]] Sent: 26 June 2001 14:54 To: [EMAIL PROTECTED] Subject: Sever hangs after ... Hi, what does mean following ... mysql show processlist; ++--+---+--++---+--- --+--+ | Id | User | Host | db | Command| Time | State | Info | ++--+---+--++---+--- --+--+ | 5 | | | autocz | Delayed_insert | 1 | Waiting on cond | dt | | 12 | | | abanners | Delayed_insert | 1 | Waiting on cond | statistics | | 18 | | | formule1 | Delayed_insert | 3 | Waiting on cond | pristup | | 9405 | | | carnext | Delayed_insert | 6863 | Waiting on cond | dailytraffic | | 10782 | | | auto_cz | Delayed_insert | 18453 | Waiting on cond | obrazky_stat | | 277825 | | | autonews | Delayed_insert | 67010 | Waiting on cond | pristup | | 277826 | | | autonews | Delayed_insert | 68166 | Waiting on cond | obrazky_stat | | 314346 | | | formule1 | Delayed_insert | 56880 | Waiting on cond | obrazky_stat | | 350836 | root | localhost | auto_cz | Sleep | 189 | NULL| NULL | | 361247 | root | localhost | auto_cz | Sleep | 1910 | NULL| NULL | | 361471 | root | localhost | auto_cz | Sleep | 1919 | NULL| NULL | | 364842 | root | localhost | auto_cz | Sleep | 291 | NULL| NULL | | 365388 | root | localhost | auto_cz | Sleep | 184 | NULL| NULL | | 365940 | root | localhost | auto_cz | Sleep | 151 | NULL| NULL | | 365950 | root | localhost | auto_cz | Sleep | 67| NULL| NULL | | 367387 | root | localhost | auto_cz | Sleep | 1126 | NULL| NULL | | 367567 | root | localhost | auto_cz | Sleep | 1248 | NULL| NULL | | 367903 | root | localhost | auto_cz | Sleep | 474 | NULL| NULL | | 368390 | root | localhost | auto_cz | Sleep | 869 | NULL| NULL | | 368810 | root | localhost | auto_cz | Sleep | 2010 | NULL| NULL | | 368924 | root | localhost | auto_cz | Sleep | 736 | NULL| NULL | | 368995 | root | localhost | auto_cz | Sleep | 119 | NULL| NULL | | 370074 | root | localhost | auto_cz | Sleep | 301 | NULL| NULL | | 370141 | root | localhost | auto_cz | Sleep | 805 | NULL| NULL | | 370532 | root | localhost | auto_cz | Sleep | 796 | NULL| NULL | | 370613 | root | localhost | auto_cz | Sleep | 464 | NULL| NULL | | 370677 | root | localhost | auto_cz | Sleep | 452 | NULL| NULL | | 371171 | root | localhost | auto_cz | Sleep | 92| NULL| NULL | | 371216 | root | localhost | auto_cz | Sleep | 1557 | NULL| NULL | cut and after while server goues to hell ... Server status is mysql status -- mysql Ver 9.38 Distrib 3.22.32, for pc-linux-gnu (i686) Connection id: 456292 Current database: Current user: root@localhost Server version 3.22.32 Protocol version10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 1 day 17 hours 5 min 22 sec Threads: 102 Questions: 9955492 Slow queries: 4 Opens: 39241 Flush tables: 1 Open tables: 63 -- TIA, Mirek Novak - 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: Tables exceeding 2gb
Guðmundur Ólafsson [EMAIL PROTECTED] writes: Hi, I have a Linux machine (Linux cartman 2.4.2-2smp #1 SMP Sun Apr 8 20:21:34 EDT 2001 i686 unknown) that is running MySQL 3.23.38-log and now I have a table that is getting VERY near to the ext2 filesystem limitation of 2gb. Ext2 doesn't have a 2 GB limit. You seem to be running Red Hat Linux 7.1, and both kernel and C library support large files on this system. For more information, I recommend a look at http://www.mysql.com/documentation/mysql/bychapter/manual_Table_types.html -- Trond Eivind Glomsrød Red Hat, Inc. - 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
delay times, threads
Running Unix, Apache, MySQL and PHP, should I worry about delay times, and will the server always present the user with the latest database update (after a possible delay)? Suppose a user can add a new row to a database in a PHP page with a form, and after submit, the next page he will see is a page displaying part of the same database, hopefully with his new row on top. Questions: A) will he always see the new data which he entered just a second before? B) How much delay could there be. In other words, how multi-tasking is PHP; will it run the next script line, even when a previous line (a MySQL query) has not been completed yet? And will MySQL execute a next (non-update) query, when the precious one is not done yet? I think that last question has the beginnings of an answer in it... :-) Thanks a lot; this is a great mailing list! (please email me directly, I am not signed up) Marco | | Marco Bleeker, Amsterdam | [EMAIL PROTECTED] | http://www.euronet.nl/users/mbleeker/ | | Attachments only after prior notice please. | Don't put me on any kind of mailing list. | | I am now receiving the Snowhite virus 4x a day | - some of you must be infected, please check ! | (No, you did not get it from me, I use Eudora) | __@ | _`\,_ |__(*)/ (*)Ah, op DIE fiets ! - 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: runnning my sql with windows98 and pws
lipp maimone wrote: is someone abble to tell me how can i do for running an sql database with windows98 without crashing my systeme? Also, using asp ( activex server page ), is it possible with mysql version3,23? Its most likely that you don't have enough memory on your system. If you want to run pws and MySQL on Win 98, I would recommend at least 128MB of RAM. Using ASP can be done through MyODBC. Seung-woo Nam - 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
SEGMENT FAULT - CORE DUMPED
Hello, I am developing a data application using wxWindows 2.2.7 on Redhat Linux 7 with MySQL at back-end. When I try to connect to MySql Database sometimes it says Segment fault (Core dumped) error. Pls help. Sudheer. - 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
SEGMENT FAULT - CORE DUMPED
Hello, I am developing a data application using wxWindows 2.2.7 on Redhat Linux 7 with MySQL at back-end. When I try to connect to MySql Database sometimes it says Segment fault (Core dumped) error. Pls help. Sudheer. - 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: SEGMENT FAULT - CORE DUMPED
Sudheer Palapparambil [EMAIL PROTECTED] writes: I am developing a data application using wxWindows 2.2.7 on Redhat Linux 7 with MySQL at back-end. When I try to connect to MySql Database sometimes it says Segment fault (Core dumped) error. Which version of mysql? -- Trond Eivind Glomsrød Red Hat, Inc. - 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: SEGMENT FAULT - CORE DUMPED
Please send relevant pieces of code! Hello, I am developing a data application using wxWindows 2.2.7 on Redhat Linux 7 with MySQL at back-end. When I try to connect to MySql Database sometimes it says Segment fault (Core dumped) error. Pls help. Sudheer. - 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
cursor definition
How do I define cursors in mysql as in Oracle? Here is an example in Oracle::: Cursor CurPerson is Select Arstall_Godkj_Stkomp From Person Where Fodselsdato = inFDato And Personnr = inPNr;; Begin Open curPerson; Fetch CurPerson into refGodkjent; If curPerson%Found Then How do I write this in mysql? Thank you for any help... Yamuna - 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
Simple Graphical Interface
I am administering a MySQL database that needs to be accessed by people who don't know SQL. They need to be able to add and delete records, but they don't need to be able to alter the structure of the database. Does anyone know of a simple Windows app or web interface that I can throw on my database so that they can do this easily? (It needs to do this without opening any gaping security holes.) Thanks, Mike _ Get your FREE download of MSN Explorer at http://explorer.msn.com - 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: Simple Graphical Interface
Try PhPMyadmin http://phpwizard.net/projects/phpMyAdmin/index.html Simon -Original Message- From: Mike Schwartz [mailto:[EMAIL PROTECTED]] Sent: 26 June 2001 16:33 To: [EMAIL PROTECTED] Subject: Simple Graphical Interface I am administering a MySQL database that needs to be accessed by people who don't know SQL. They need to be able to add and delete records, but they don't need to be able to alter the structure of the database. Does anyone know of a simple Windows app or web interface that I can throw on my database so that they can do this easily? (It needs to do this without opening any gaping security holes.) Thanks, Mike _ Get your FREE download of MSN Explorer at http://explorer.msn.com - 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 - 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
3.23.39 Solaris binary on Solaris 2.6 (sparc)
A simple question... I noticed that the newer MySQL binaries are listed as being for Solaris 2.7+ (mysql-3.23.39-sun-solaris2.7-sparc.tar.gz) I want to run it on Solaris 2.6, will this run OK?? There didn't seem to be any docs relating to this (would be nice to see these kind of comments in the binary README file). I only have one system (and that is production) so I can't really afford downtime for testing so I need confirmation from someone that it will work OK. I just had a failed attempt at running a binary I had compiled myself, so I thought it would be best to use the standard binary. The system is: (uname -a) SunOS 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-2 I will be upgrading from binary Distrib 3.22.25, for sun-solaris2.6 (sparc), yes well overdue! Thanks for any feedback. Ross Kendall Technical Developer http://www.bluecarrots.com/ Tel: +44 (0) 20 7479 2789 - 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: HELP NEEDED: Problems with SELECT in combination with HAVING
Try SELECT robotId, max(startTime) as crit FROM RobotRun WHERE startTime = '2001-06-26 00:00:00' AND endTime IS NOT NULL GROUP BY robotId This should return the robotId and the most recent startTime labeled 'crit' for all records specified in the where clause. And have a look in the manual for the group by statement - since this statement works like a enhanced 'select distinct' query it will produce ill results applied to non unique combinations in the select and group by statement. I suppose that¹s the case for your 'robotId, startTime' pair. If I got this wrong forgive me it was first thing in the morning. Hannes On 6/26/01 4:05 AM, Thomas Michael Koch [EMAIL PROTECTED] wrote: Hello there - I have this weird problem using MySql (version 3.23.39). It seems that MySql interpretation of a SELECT statment using HAVING is completely random. I have a table called RobotRun which stores information about when a robot has been running (start, stop and the id of the robot). This translates to columns: runId (primary key), robotId (the id of the robot), startTime and endTime. A robot can run several times during its life time, thus several records will appear in RobotRun for the same robotId, however, each row will always have a unique runId. The purpose of the SQL is to produce one RobotRun row for each robot, with the added restriction that it is only the row with the newest startTime value that gets selected. Now if I do the following SQL things start to get strange: SELECT robotId, startTime, max(startTime) as crit FROM RobotRun WHERE startTime = '2001-06-26 00:00:00' AND endTime IS NOT NULL GROUP BY robotId HAVING startTime = crit This query produces 321 rows. Setting the startTime to '2001-06-25 00:00:00' produces 707 rows, which is correct and expected since the input set is larger. NOW: Setting the startTime to '2001-06-24 00:00:00' produces 21 rows What is going on. I cannot see how this is possible. The input set is only getting larger. The number of rows involved in the table is in the vicinity of 5. The theoretical maximum number of rows produced from the SQL is in the neighbourhood of 5000 rows. That shouldn't be a problem. I have also tried the following statement with the same result (problem): SELECT robotId, startTime FROM RobotRun WHERE startTime = '2001-06-26 00:00:00' AND endTime IS NOT NULL GROUP BY robotId HAVING startTime = max(startTime) Any help would be appreciated. Regards Thomas Koch - 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 - 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: Got timeout reading communication packets
Slight correction in the query... The query just looks like: REPLACE into reflectivity.measurement_extended_data set content_typeID = 7, contentID = 121529, arrayID = 0, positionID = 1, testID = 1, iteration = 0, test_locationID = 1, date_added = 993165848, added_by = 18, data = '396 601 12011801,0 191 191 191 191 190 189 188 188 188 188 188 187 191 191 191 191 192 snip/snip' -- --- Seth Northrop Manager of Information Technology Reflectivity, Inc. 3910 Freedom Circle, Suite 103 Santa Clara, CA 95054 voice: 408-970-8881 x147 fax:408-970-8840 http://www.reflectivity.com/ - 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
Odd problem issueing commands at the console
Just installed 3.23.37 on Red Hat 7.0 from source. I've done this a few times but this time I encountered a mysterious problem. a) server is started and runs under my designated user (mysqladm:mysqlgrp) b) /usr/local/mysql/bin is in PATH of both root and mysqladm c) using either of these users, when I issue a mysql command (here mysqlshow): mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) d) when I cd to /usr/local/mysql/bin and issue the command as shown it succeeds: $ ./mysqlshow +-+ | Databases | +-+ | mysql | | test | +--+ What's going on here? Peter Matulis - 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: Got timeout reading communication packets
The above only implies that your program exited without calling mysql_close(). Nothing to do with your problem. But.. why would the console be reporting this? Ie, I'm getting the same result (same error in the error log, same truncation) when I manually pipe the query to the mysql console. (Note that the errors are coming from localhost; the actual script is run from a client). Shouldn't a direct console query terminate the connection to the database after proper completion? But, as I told you , you did not quote string constants. And shoot out your resulting string to some file for inspection. That might help you find your error. See previous emails.. I've been doing this.. the query looks sane; no \0 characters, no odd binary data, nothing out of whack where it truncates (ie, no renegade ' etc.). Because running the query through the console with no intervention of the c api causes the same result I'm finding it difficult to believe it's an issue with the code itself unless it has something to do with the string itself (ie.. there is some unknown character in there). But, that seems unlikely since the code to generate the query is fairly straight forward.. just dump a bunch of tab delimited ints groups of which comma delimted into a string. The query just looks like: REPLACE into reflectivity.measurement_extended_data set content_typeID = 7, contentID = 121529, arrayID = 0, positionID = 1, testID = 1, iteration = 0, test_locationID = 1, date_added = 993165848, added_by = 18, data = '396 601 12011801,0 191 191 191 191 190 189 188 188 188 188 188 187 191 191 191 191 192 snip/snip; It just happens to be several MB large. Or... are we just having a huge disconnect here? Thanks! Seth - 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
Optimizing MySQL
I have a MySQL myISAM database that has about 300 MB of information. Recently the index files became corrupted and I ran the myisamchk *.MYI -r -S to repair them. Ever since then mySQLd process has been using up a ton of processor time. And some of the queries that I run have started taking a long time in the tables that I access frequently. The database also starting growing at that time as well so I am not sure what the problem is. Anyone run into a database that seems to be running very inefficiently and figure a way to optimize it? THe indexes don't seem to be the problem. Any and all suggestions are very much appreciated. Michael Blood [EMAIL PROTECTED] - 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: Odd problem issueing commands at the console
Could it be that you have two mysql client binaries accessing two different config files - some remainders of a previous MySQL installation? Hannes On 6/26/01 9:02 AM, Peter Matulis [EMAIL PROTECTED] wrote: Just installed 3.23.37 on Red Hat 7.0 from source. I've done this a few times but this time I encountered a mysterious problem. a) server is started and runs under my designated user (mysqladm:mysqlgrp) b) /usr/local/mysql/bin is in PATH of both root and mysqladm c) using either of these users, when I issue a mysql command (here mysqlshow): mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) d) when I cd to /usr/local/mysql/bin and issue the command as shown it succeeds: $ ./mysqlshow +-+ | Databases | +-+ | mysql | | test | +--+ What's going on here? Peter Matulis - 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 - 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: Odd problem issueing commands at the console
You must have an rpm installation of mysql and your source installation. Check to see if there are mysql* commands within /usr/bin directory. It's going to search there first, then /usr/local/bin. The commands within /usr/bin are going to look for the mysql-everthing within /var/lib/ Jonathan - Original Message - From: Peter Matulis [EMAIL PROTECTED] To: Mysql (E-mail) [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 12:02 PM Subject: Odd problem issueing commands at the console Just installed 3.23.37 on Red Hat 7.0 from source. I've done this a few times but this time I encountered a mysterious problem. a) server is started and runs under my designated user (mysqladm:mysqlgrp) b) /usr/local/mysql/bin is in PATH of both root and mysqladm c) using either of these users, when I issue a mysql command (here mysqlshow): mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) d) when I cd to /usr/local/mysql/bin and issue the command as shown it succeeds: $ ./mysqlshow +-+ | Databases | +-+ | mysql | | test | +--+ What's going on here? Peter Matulis - 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 - 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: auto-increment sequence question
Hi Gunnar, Why don't you keep the key out of the business rule and create a column to identify the type of customer? How are you going to handle the application when your business reaches more than vip customers??? This is an issue that can be avoided by creating a type column . Siomara PS: This is just a suggestion of someone that once got this issue. From: Gunnar von Boehn [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: auto-increment sequence question Date: Tue, 26 Jun 2001 13:49:33 +0200 Hello everybody, I thing, that I have a problem that needs a sequence and that auto-increment can't do the job this time. I already consulted the manual and the mailarchive. I saw several different proposals, now I'm a bit confused and don't know exactly what the rigth way is to do it. Could somebody please clarify the following? We are using ISAM tables on mysql 3.22.32. We have an id-column but the id will be generated out of two different ranges. Example: all VIP-customers will get an id from 1000- and normal customers from 1-999. So, I think the only way to solve this is a sequence table. Lets take a single row, integer value for holding the sequence: CREATE TABLE sequence( id int4; ); My question is this: Is this the best way to get and evalute the sequence? LOCK TABLES sequence WRITE; UPDATE sequence SET id=id+1; SELECT id FROM sequence; UNLOCK TABLES; Thanks Gunnar von Boehn - 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 _ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. - 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: DISTINCT
Hi Tom, The solution to your problem could be simple if the redundancy is across all fields. Then you could simply issue a CREATE table distinct_records SELECT distinct field_1,.field_last FROM table_duplicate_records WHERE 1=1; Or CREATE table distinct_records SELECT field_1,.field_last FROM table_duplicate_records GROUP BY field_1,.field_last; The latter will not work properly if one or more of the fields selected is not identical for identical combinations of the remaining fields. Otherwise if you have one or more fields that is not identical among a group of otherwise (apart from those fields) duplicate records) you must decide if this difference matters to you or not. If they don¹t matter just select all where the duplicates are identical. Make sure that the fields in the select and group by part are the same. Example table_duplicate records field_1 field_2 field_3 a b c a b c a b d f g h f g h d j k k i o CREATE table distinct_records SELECT field_1, field_2, field_3 FROM table_duplicate_records GROUP BY field_1, field_2, field_3; table_distinct_records field_1 field_2 field_3 a b c a b d f g h d j k k i o Got the idea? Hope that helps Hannes On 6/26/01 4:00 AM, tom harrow [EMAIL PROTECTED] wrote: Hi Hannes I saw your reply to a question someone had regarding the DISTINCT keyword and doing the opposite. I too have the same problem... basically need to know the values that arnt distinct and get rid of them but keeping one of course... so there are no duplicates. i am trying to write an asp applicatiojn to do it at the mo but its getting quitre complex. Anyway I thinkk im looking far to deep into the problem and there is probably a much simpler way of doing it. any ideas cheers Tom Harrow Web Developer Netpoll Ltd 9-12 Long Lane London EC1A 9HA TEL 020 7710 2800 FAX 020 7710 2828 - 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: 3.23.39 Solaris binary on Solaris 2.6 (sparc)
Hi, I don't know if you can use 2.7+ in a 2.6. However I downloaded and compiled the source without no problems. Until now it's running ok. Please, tell me if I can help! {}S Jose Vilmar Estacio de Souza MailTO: [EMAIL PROTECTED] + 55 21 7894-3041 INFORMAL INFORMATICA http://www.informal.com.br + 55 21 556-7903 - Original Message - From: Ross Kendall [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 1:03 PM Subject: 3.23.39 Solaris binary on Solaris 2.6 (sparc) A simple question... I noticed that the newer MySQL binaries are listed as being for Solaris 2.7+ (mysql-3.23.39-sun-solaris2.7-sparc.tar.gz) I want to run it on Solaris 2.6, will this run OK?? There didn't seem to be any docs relating to this (would be nice to see these kind of comments in the binary README file). I only have one system (and that is production) so I can't really afford downtime for testing so I need confirmation from someone that it will work OK. I just had a failed attempt at running a binary I had compiled myself, so I thought it would be best to use the standard binary. The system is: (uname -a) SunOS 5.6 Generic_105181-17 sun4u sparc SUNW,Ultra-2 I will be upgrading from binary Distrib 3.22.25, for sun-solaris2.6 (sparc), yes well overdue! Thanks for any feedback. Ross Kendall Technical Developer http://www.bluecarrots.com/ Tel: +44 (0) 20 7479 2789 - 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 - 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: Odd problem issueing commands at the console
I had the same problem last night, eventually grant all to root on *.* identified by 'yourpass' got me in I must have mucked up the permissions at (the problem was with mysqlgui not mysqlshow though) Sean -Original Message- From: Peter Matulis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 5:03 PM To: Mysql (E-mail) Subject: Odd problem issueing commands at the console Just installed 3.23.37 on Red Hat 7.0 from source. I've done this a few times but this time I encountered a mysterious problem. a) server is started and runs under my designated user (mysqladm:mysqlgrp) b) /usr/local/mysql/bin is in PATH of both root and mysqladm c) using either of these users, when I issue a mysql command (here mysqlshow): mysqlshow: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) d) when I cd to /usr/local/mysql/bin and issue the command as shown it succeeds: $ ./mysqlshow +-+ | Databases | +-+ | mysql | | test | +--+ What's going on here? Peter Matulis - 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 - 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: auto-increment sequence question
On Tuesday 26 June 2001 04:49, Gunnar von Boehn wrote: Hello everybody, I thing, that I have a problem that needs a sequence and that auto-increment can't do the job this time. So, I think the only way to solve this is a sequence table. Lets take a single row, integer value for holding the sequence: CREATE TABLE sequence( id int4; ); My question is this: Is this the best way to get and evalute the sequence? LOCK TABLES sequence WRITE; UPDATE sequence SET id=id+1; SELECT id FROM sequence; UNLOCK TABLES; This is more work than you need. You can use this sequence: UPDATE sequence SET id=LAST_INSERT_ID(id+1) SELECT LAST_INSERT_ID() The first statement updates the sequence table atomically. It sets the id value to the id+1 and sets the last insert ID to id+1. This is done atomically. The next statement gets back the ID that was set in the first one. Notice that the SELECT does not have a FROM clause! The database handles the value of LAST_INSERT_ID on a connection by connection basis so, you'll get the right value. This set of SQL statements does not require table locks. We use it all the time. Best, Kyle - 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: Lat/Long storage?
NUMBER(8,5). You'll need around 5 digits after the decimal point. (Think GPS accuracy == 10 meters for high-grade, 100 m for dumbed-down civilian use. At the equator, that's 0.9 or 0.0009 degrees respectively. At higher latitudes, that'd be correspondingly less.) If you value accuracy, DON'T USE FLOAT. Float has only 6-7 digits of accuracy, which, if you take out the 3 digits before the ., leave you with only 3 decimal places after (== roughly 1 km - too rough). Use Double (which would be 8 characters), or use number (8,5) or number (7,4), which are approximately the same size. The latter are easier to work with for display purposes, the former for computation purposes. Take your pick. If you use NUMBER(#,#), you should make sure that internally, you convert them directly to and from double to preserve the accuracy of the numbers. -Original Message- From: Nelson Goforth [mailto:[EMAIL PROTECTED]] Sent: Monday, June 25, 2001 2:03 PM To: [EMAIL PROTECTED] Subject: Lat/Long storage? I need to store latitude and longitude in a MySQL table. It needs to allow human entry. Do you have a preferred storage technique for these numbers? Nelson Goforth --
Re: Optimizing MySQL
Recently the index files became corrupted and I ran the myisamchk *.MYI -r -S to repair them. Try an OPTIMIZE TABLE or ANALYZE TABLE. Your queries may be using the incorrect indexes since the statistics have not been updated. You can also do this: myisamchk *.MYI -a Sincerely, Steven Roussey Network54.com http://network54.com/?pp=e - 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: auto-increment sequence question
At 1:49 PM +0200 6/26/01, Gunnar von Boehn wrote: Hello everybody, I thing, that I have a problem that needs a sequence and that auto-increment can't do the job this time. I already consulted the manual and the mailarchive. I saw several different proposals, now I'm a bit confused and don't know exactly what the rigth way is to do it. Could somebody please clarify the following? We are using ISAM tables on mysql 3.22.32. I would use MyISAM, not ISAM, but the instructions below should work regardless. We have an id-column but the id will be generated out of two different ranges. Example: all VIP-customers will get an id from 1000- and normal customers from 1-999. So, I think the only way to solve this is a sequence table. Lets take a single row, integer value for holding the sequence: CREATE TABLE sequence( id int4; ); If you're going to need two sequences, you need two sequence generators. A single table with a single column won't do it. Try this, which will work for any number of sequences. First, create a table to hold your sequence numbers: # Create a table to be used for multiple sequences CREATE TABLE sequence ( nameCHAR(20) NOT NULL PRIMARY KEY, seq BIGINT UNSIGNED NOT NULL ); name identifies your sequence. It's a PRIMARY KEY for fast lookups. seq is the current sequence value for a given sequence. Next, intialize your sequence counters to one less than the first number you want to use in each sequence: INSERT INTO multiseq (name, seq) VALUES(vip,999); INSERT INTO multiseq (name, seq) VALUES(normal,); To generate a new VIP sequence number, do this: UPDATE multiseq SET seq = LAST_INSERT_ID(seq+1) WHERE name = vip; SELECT vip, LAST_INSERT_ID(); To generate a new Normal sequence number, do this: UPDATE multiseq SET seq = LAST_INSERT_ID(seq+1) WHERE name = normal; SELECT normal, LAST_INSERT_ID(); LAST_INSERT_ID() with an argument creates a value that can be treated just like it's an AUTO_INCREMENT value. That means you can call LAST_INSERT_ID() without an argument later in the current session to retrieve the value you generated. This also has the advantage that you don't need to set up any locks. The table can be extended to provide more than two sequences simply by inserting new rows. (This is one way to main hit counters for a bunch of Web pages using a single table, for example - although you'd want to use a longer name column in that case...) My question is this: Is this the best way to get and evalute the sequence? LOCK TABLES sequence WRITE; UPDATE sequence SET id=id+1; SELECT id FROM sequence; UNLOCK TABLES; Thanks Gunnar von Boehn -- Paul DuBois, [EMAIL PROTECTED] - 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
preventing duplicate entries
I want to prevent duplicate entries into my mysql database which holds invertory of all network eqpt at my site. Engineers access it thru netscape and the query insert is done via pdp [below]. I will place the script into php, any pointers on this would be appreciated. THX! Pete html body ?php require(fedb.inc); mysql_connect(localhost,$user,$password); @mysql_select_db($db) or die( Unable to select database); /*Insert into database */ mysql_query (INSERT INTO asset (site_id, hostname, device, model, serial, ip, dept, mhz, ram, hd_size, os_ver, status, data_port, pp_port, hub_port, digi_port, csmim_port, tprmim_port, xyplex_port, comments, fe) VALUES ('$site_id', '$hostname', '$device', '$model', '$serial', '$ip', '$dept', '$mhz', '$ram', '$hd_size', '$os_ver', '$status', '$data_port', '$pp_port', '$hub_port', '$digi_port', '$csmim_port', '$tprmim_port', '$xyplex_port', '$comments', '$fe') ); print (Thanks for submitting your device.); ? a href='index.html'bHome/b/a /body /html ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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
PLEASE READ: Porting Windows VC++ MySQL Proggie to Linux\Unix
I appreciate that this might be a bit off topic but any help would be appreciated. I need to port this program (attached) to the Linux environment. This is the first program I have attempted to port. Has anyone ever had to port from Windows to Linux\Unix, and if so how did it go and what tools did you use. I have downloaded cygwin for windows, is this going to be any use? The program itself simply uses the mysql++ API library to connect to the server, run a query and then exit. Parts of the program that might cause me problems are the headers I think, because what is Linux for: #include iostream #include iomanip #include include\mysql++ Please I really just need a starting point; someone to say you need this tool you can download it at www.thistool.com. I am a complete newbie to porting (though not to mysql nor working with linux or windows programming) Hopefully when I become proficient with this program I can move on to bigger and greater projects. ***I would appreciate ANY input*** Sorry once again if this is off topic!! Thanks lots David Ayliffe ([EMAIL PROTECTED]) - 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: preventing duplicate entries
-- Original Message -- From: Pete Kuczynski [EMAIL PROTECTED] Date: Tue, 26 Jun 2001 13:19:02 -0500 I want to prevent duplicate entries into my mysql database which holds invertory of all network eqpt at my site. Engineers access it thru netscape and the query insert is done via pdp [below]. I will place the script into php, any pointers on this would be appreciated. Why not make your inventory identifier field a unique index: ie: alter table inventory add unique itemid (itemid); Now, whenever someone tries to create a duplicate item identifier, MySQL will issue an error, which your script can capture. I don't use PHP, but do use VB through MyODBC, and this is how I catch unwanted duplicates. - 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
Getting the number of years between two dates
It's possible get the number of years between two dates in a mysql function? thanks, Augusto - 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
Memory usage
Hello, I was wondering, how can I lookup how much memory MySQL is currently allowed to use, and how can I change this value? Thanks in advance, Leon Mergen [EMAIL PROTECTED] BlazeBox, Inc. ICQ: 55677353 - 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
Creating Table with a Default Datetime field
How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - 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
Problem installing binary mysql on HPUX10.20
Hi... I downloaded the mysql binary for HPUX10.20 and when I run script/mysql_install_db I got the followin message: --- $ scripts/mysql_install_db Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables 010626 15:07:08 Warning: setrlimit couldn't increase number of open files to more than 60 010626 15:07:08 Warning: Changed limits: max_connections: 50 table_cache: 64 scripts/mysql_install_db[292]: 9589 Memory fault(coredump) Installation of grant tables failed! Examine the logs in ./data for more information. You can also try to start the mysqld daemon with: ./bin/mysqld --skip-grant You can use the command line tool ./bin/mysql to connect to the mysql database and look at the grant tables: shell ./bin/mysql -u root mysql mysql show tables Try 'mysqld --help' if you have problems with paths. Using --log gives you a log in ./data that may be helpful. The latest information about MySQL is available on the web at http://www.mysql.com Please consult the MySQL manual section: 'Problems running mysql_install_db', and the manual section that describes problems on your OS. Another information source is the MySQL email archive. Please check all of the above before mailing us! And if you do mail us, you MUST use the ./bin/mysqlbug script! - I already saw the section Problems running mysql_install_db from MySQL manual but... There is no information about this problem. Please, help me ok?! Leandro. Leandro Melo de Sales. CEFET/AL - Centro Federal de Educação Tecnológica de Alagoas Gerência de Tecnologia da Informação Administração de Rede - GTI Computers are useless. They can only give you answers. -- Pablo Picasso - Mensagem enviada pelo servidor de Webmail do CEFET-AL - 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
Default Datetime?
How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - 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: Getting the number of years between two dates
Hi, i found a method to do this: try extract(year from date1) - extract(year from date2) I hope it will work Michael -Ursprüngliche Nachricht- Von: Augusto Cesar Castoldi [mailto:[EMAIL PROTECTED]] Gesendet: Dienstag, 26. Juni 2001 19:06 An: [EMAIL PROTECTED] Betreff: Getting the number of years between two dates It's possible get the number of years between two dates in a mysql function? thanks, Augusto - 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 - 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
backup-problem
hallo! i have a backup-problem: when i use mysqldump -u michael -p --opt --all-databases backup i get the following error: USE backup; mysqldump: Got error: 1017: Can't find file: 'title.MYD' (errno: 2) when using LOCK TABLES but when i use mysqldump -u michael -p --opt --database books backup it works. table title is a part of books why? what is going wrong? -- Gruß bye Michael Ott - - Siemens AG - IS IT PS 51 ERL - - Werner-von-Siemens-Strasse 60 - - 91050 Erlangen- - Tel. +49 91 31 7 42 0 54 - - [EMAIL PROTECTED] - - open-source and you have much fun - 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
CF and MySql?
Can Cold Fusion querys work with MySQL? What would I have to do if anything to make it work? WD - 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: Tables exceeding 2gb
(sql, to fool lame filter) ryc [EMAIL PROTECTED] writes: The OS may not have a 2GB limit, however the table MAY. If you do a myisamchk on the table it will tell you if you are running out of space in the table. If you are.. you need do something like alter table tablename max_rows=1000.. (its in the manual) Also, the package needs to be compiled on a system with LFS. This is detected at compile time, not at runtime. -- Trond Eivind Glomsrød Red Hat, Inc. - 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: preventing duplicate entries
My primary key field is a auto incremented index, the field I want to make unique, or to say, prevent duplicates in, is the hostname field, which has, hostnames of devices. Is the key word UNIQUE then? Not all of the devices have hostnames assigned to them, like terminals, so the hostname field is blank in many cases. If I make that field UNIQUE, will that cause a problem, with multiple blank fields? Thx! Pete Kristopher Briscoe wrote: What does your table definition look like? What fields are you looking to make unique? All you need to do is set one or multiple combined fields to UNIQUE or Primary keys. This will prevent duplicats. Another way would be to query the table for the information that is going to be inserted and see if you get a row returned. If so, then let the FE know. I would combine both methods for optimal assurance. On another note, I have been very interested in working with DHL. At one point I was speaking with someone in your HR department, but they have seen departed. I know this is odd, but if I forwared you my resume do you think you could pass it on to your internal recruiting staff? I am a Sr. SUN Solaris Engineer with more than 10years experience if that helps at all. Good luck with your work. Kris- _ Get your FREE download of MSN Explorer at http://explorer.msn.com -- ___ Pete Kuczynski Principal Field Engineer DHL Airways Inc. Infrastructure Technology Services (773)-462-9758 24/7 Helpdesk 1-800-434-5767 - 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: CF and MySql?
Install an ODBC for MySql... - Original Message - From: Wade DeWerff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 2:57 PM Subject: CF and MySql? Can Cold Fusion querys work with MySQL? What would I have to do if anything to make it work? WD - 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 _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com - 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: CF and MySql?
There are many ways to do this - I'm assuming you want to do this on an Windows box. One way is through MyODBC. It's an ODBC driver that you can install on your server, available from the MySQL web site. From there, all you have to do is create a new DSN, either through the CF Admin or Windows. You can then reference this DSN just like you would any other ODBC connection. Good Luck, Dennis ** Beridney Computer Services http://www.beridney.com - Original Message - From: Wade DeWerff [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 11:57 AM Subject: CF and MySql? Can Cold Fusion querys work with MySQL? What would I have to do if anything to make it work? WD - 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 - 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: CF and MySql?
If you are using Cold Fusion server, yes they will work.. You have to download MyODBC from www.mysql.com install it.. and then set it up in the ODBC control panel (assuming you are using windows). Then you should be able to see the mysql databases as a datasource in the Cold Fusion admin page. CAA -Original Message- From: Wade DeWerff [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 1:58 PM To: [EMAIL PROTECTED] Subject: CF and MySql? Can Cold Fusion querys work with MySQL? What would I have to do if anything to make it work? WD - 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 - 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
COnversion from Btrieve to MySQL
Has anyone ever attempted, or succeded in converting a Btrieve database to a MySQL database? Peter Marchetti Media Visions, Inc. [EMAIL PROTECTED] - 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: Creating Table with a Default Datetime field
hi. check out the TIMESTAMP column type...maybe TIMESTAMP(14) as the column type? you can then format the date accordingly with...uh...DATE_FORMAT() in your select statements... hth. -ravi -Original Message- From: Richard Bates [mailto:[EMAIL PROTECTED]] Sent: Tuesday, June 26, 2001 3:00 PM To: [EMAIL PROTECTED] Subject: Creating Table with a Default Datetime field How do I get a default date time in the create table clause... I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == - 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 - 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: Getting the number of years between two dates
At 3:05 PM -0300 6/26/01, Augusto Cesar Castoldi wrote: It's possible get the number of years between two dates in a mysql function? That kind of depends on what you mean by the number of years between two dates. For example, do you define the number of years between 2000-12-31 and 2001-01-01 as 0 or as 1 or as some fractional number? thanks, Augusto -- Paul DuBois, [EMAIL PROTECTED] - 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: Default Datetime?
At 2:43 PM -0400 6/26/01, Richard Bates wrote: How do I get a default date time in the create table clause... The MySQL Reference Manual states that DEFAULT values must be constants. Insert NOW() into the field when you create new records. I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == -- Paul DuBois, [EMAIL PROTECTED] - 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: MySql to Oracle migration
On Tue, Jun 12, 2001 at 04:42:42PM -0700, Jeremy Zawodny wrote: On Tue, Jun 12, 2001 at 05:06:59PM -0500, Zhu George-CZZ010 wrote: Is there a way/tool to migrate the Application from MySql to Oracle 8i? Oracle has one available on their web site... Mostly a waste of space. Tim. - 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: Default Datetime?
But how about TIMESTAMP? For example: CREATE TABLE time_test (creation_date TIMESTAMP, info VARCHAR(100)); This should work fine too,doesn't it? -sherzodR On Tue, 26 Jun 2001, Paul DuBois wrote: At 2:43 PM -0400 6/26/01, Richard Bates wrote: How do I get a default date time in the create table clause... The MySQL Reference Manual states that DEFAULT values must be constants. Insert NOW() into the field when you create new records. I have tried Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT NOW(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT SYSDATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); Create table( CreationDateDATETIMEDEFAULT CURRENT_DATE(), Infovarchar(100) ); All without the quote return with invalid syntax. With the quote inserts 000-00-00 00:00:00 meaining invalid date. == === Richard Bates === TELEHOUSE America == -- Paul DuBois, [EMAIL PROTECTED] - 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 - 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: MySql to Oracle migration
Can someone explain me why is it waste of space??? Thank you -sherzodR On Tue, 26 Jun 2001, Tim Bunce wrote: On Tue, Jun 12, 2001 at 04:42:42PM -0700, Jeremy Zawodny wrote: On Tue, Jun 12, 2001 at 05:06:59PM -0500, Zhu George-CZZ010 wrote: Is there a way/tool to migrate the Application from MySql to Oracle 8i? Oracle has one available on their web site... Mostly a waste of space. Tim. - 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 - 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
More questions about Fulltext searching.
Ok, The message set that I noticed this morning sparked my interest in this. Currently I'm developing a search engine that will utilize mysql's fulltext match technology. The problem that i've run into is, I can't seem to find any documentation on how to force an AND search with in MATCH AGAINST syntax, As far as I can tell this is `OR' only. Has is there an option to force AND? If so could this please be appended to the manual under the `MySQL Full-text Search' section. Thanks. - 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
C++ API Library for Windows AND Linux
Is their a C++ API library which is able to work on BOTH Windows (2K) and Linux. I need the SAME library to work on both platforms. I take it neither of the top two will work (list below): Borland or MS libraries. What are the other two. I need to write a program which is portable to both windows and Linux. C++ is preferred. Any other advice is appreciated. -- from site -- MySQL++ 1.7.1 for Borland C++ 5.* for Windows (contributed by Arturs Aboltins [EMAIL PROTECTED]) MySQL++ 1.7.1 for Microsoft Visual C++ 6.0 (contributed by LazyFox [EMAIL PROTECTED]) A Patch for MySQL++ for use with the STLport-4.0 library (contributed by Bert Hubert [EMAIL PROTECTED]) MySQL++ 1.7.6a Source tarball for Tru64 Compiler (version 6.*) (contributed by Steffen Neumann [EMAIL PROTECTED]) -- end from site -- Sorry for two posts in one day!! Thanks lots David Ayliffe ([EMAIL PROTECTED]) - 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: preventing duplicate entries
-- Original Message -- From: Pete Kuczynski [EMAIL PROTECTED] Date: Tue, 26 Jun 2001 14:02:08 -0500 My primary key field is a auto incremented index, the field I want to make unique, or to say, prevent duplicates in, is the hostname field, which has, hostnames of devices. Is the key word UNIQUE then? Not all of the devices have hostnames assigned to them, like terminals, so the hostname field is blank in many cases. If I make that field UNIQUE, will that cause a problem, with multiple blank fields? I believe that a unique index field will permit Null values. Aaron (sql - these filters are really annoying!) - 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: MySql to Oracle migration
On Tue, Jun 26, 2001 at 05:20:25PM -0400, Sherzod Ruzmetov wrote: Can someone explain me why is it waste of space??? No support for emulating autoincrement fields. No support for mysql specific types. No support for mysql specific functions. No support for ... In fact no support for almost anything useful that mysql does. The tragedy (or perhaps advantage, for this audience) is that Oracle is capable of doing a good migration through triggers and PL/SQL etc etc. Tim. - 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: Optimizing MySQL
I'm not an expert, but I've never heard of a db getting slower after an index rebuild. It's possible that's just a red herring. You've been speaking generally about things being slower, I'd suggest you get specific. Track down the queries are slow now, use EXPLAIN on them to see what indexes that are using (or not). There a way to log slow queries in MySQL, that might help. Perhaps usage has just shifted and there are now a lot of writers and readers to the same table - run mysqladmin pr and look to see if some servers are waiting due to table locks. mysqladmin -i3 pr is good to do continuous monitoring. -bill - 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
Newbie
hello all, I am kind of new to all the unix OS stuff. Lately i have been doing alot of work in FreeBSD, and i have started playing with mysql. I got it to install and everything, the only problem i am having, is i can't seem to connect from anywhere off the machine, i run the grant privileges on command and it says 0 rows effected. i was wondering if i may be doing something wrong. any help would be appreciated, thanx Jason
lower_case_table_names issue
Hi to all, I'm new to linux and mySql (about 5 days and nights :)), I have mandrake8.0 that provide a version of MySql which I'm trying to use from a VisualBasic application (on win2000), I connect to my database on MySQL using MySqlODBC, and everyting goes OK, except the table names wich I need to be case insensitive on queries, after reading the manual I found that I could use the variable 'lower_case_table_names=1' to this prupose. I set the variable, but when I try to select something MySQL returns a error 'database.MyTable does not exist', but she exists with name 'mytable'. If someone could help! Tankyou Rui Rosa - 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: Copy Record command
Don't know what a COPY RECORD command is but my best guess is that you are looking for a create table with a select clause. - Original Message - From: Klein, Tracy ISTA:EX [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 0:11 Subject: Copy Record command Hello, I cannot find a COPY RECORD command in www.mysql.com - is it to be found under another name? I have a 49 field record I have to create this morning. Ugh. - 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 - 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: Newbie
And what is the command you are using to connect? - Original Message - From: Jason Brunk [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 7:00 Subject: Newbie hello all, I am kind of new to all the unix OS stuff. Lately i have been doing alot of work in FreeBSD, and i have started playing with mysql. I got it to install and everything, the only problem i am having, is i can't seem to connect from anywhere off the machine, i run the grant privileges on command and it says 0 rows effected. i was wondering if i may be doing something wrong. any help would be appreciated, thanx Jason - 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: Grant/Revoke dialogue doesn't open
On Tue, 26 Jun 2001 22:29, Sinisa Milivojevic wrote: David Robley writes: I came across this discussion from April 2001 on the archives, but nothing more recent. I also have encountered the problem, and thought I could submit a bit more information. OS - Linux 2.4.3 XFree - 4.0.2 KDE- 2.1.1 The problem is not exactly that the grant/revoke dialogue won't open, it opens but only shows (in my case) the first 'line' of the dialogue having the Grant checkbox and username text box. I can minimise and restore the window; maximising causes it to widen to screen width but the height remains the same. The only resizing that can be done is horizontal. Please query me if any further info is needed. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Many FLTK applications, including mysqlgui have problems under KDE 2.x.x. Try changing settings in KDE Window Manager or temproarily use other window manager with KDE. Thank you. I will have a play with settings (changing window manager isn't an option at the moment) and report any positive results for the benefit of others with similar problem. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Figures won't lie, but liars will figure. - 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: Optimizing MySQL
I have used optimize table on several tables however it has not affected the speed of the queries or the large amount of processor resources that are being used. Have you heard of a way to rebuild a table more efficiently? Go back and do this: myisamchk -o *MYI myisamchk -a *MYI myisamchk -S *MYI myisamchk -R1 *MYI Do them as sepparate commands. It will take a while. Look for messages from myisamchk about the tables. Sincerely, Steven Roussey Network54.com http://network54.com/?pp=e - 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: lower_case_table_names issue
Did you convert the table/column names to lower case? If lower_case_table_names is=1 MySQL will convert all table names to lower case on storage and lookup ... but you need to first convert your old table names to lower case before starting mysqld. If you have not done so, you should run an ALTER query to change them to lower-case ... ALTER TABLE tbl_name CHANGE [COLUMN] old_col_name create_definition (http://www.mysql.com/doc/A/L/ALTER_TABLE.html) Gerald Jensen - Original Message - From: Rui Rosa [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 26, 2001 6:37 PM Subject: lower_case_table_names issue Hi to all, I'm new to linux and mySql (about 5 days and nights :)), I have mandrake8.0 that provide a version of MySql which I'm trying to use from a VisualBasic application (on win2000), I connect to my database on MySQL using MySqlODBC, and everyting goes OK, except the table names wich I need to be case insensitive on queries, after reading the manual I found that I could use the variable 'lower_case_table_names=1' to this prupose. I set the variable, but when I try to select something MySQL returns a error 'database.MyTable does not exist', but she exists with name 'mytable'. If someone could help! Tankyou Rui Rosa - 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 - 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: Conversion from Access JOIN syntax to MySQL JOIN syntax...
As it is such a big query, I don't have time to look at it for you but it may be easier if you convert the RIGHT JOINS to LEFT JOINS for starters. The manual does recommend LEFT JOINS, mainly for portability. First part would be something like (leg_activity LEFT JOIN leg_comm_hist ON (leg_comm_hist.leg_activity_id = leg_activity.id) LEFT JOIN leg_version_hist ON leg_version_hist.leg_activity_id = leg_activity.id) - Original Message - From: Joshua J. Kugler [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 2:47 Subject: Conversion from Access JOIN syntax to MySQL JOIN syntax... Yes, I've read the docs on JOIN syntax, and search the list archives for similar information. I have this query: SELECT leg_activity.activity_date, leg_transitions.trans_desc, leg_text.leg_version, body_list.body_name FROM (((leg_version_hist RIGHT JOIN (leg_comm_hist RIGHT JOIN leg_activity ON leg_comm_hist.leg_activity_id = leg_activity.id) ON leg_version_hist.leg_activity_id = leg_activity.id) LEFT JOIN leg_text ON leg_version_hist.leg_text_id = leg_text.id) INNER JOIN leg_transitions ON leg_activity.transition_id = leg_transitions.id) LEFT JOIN body_list ON leg_comm_hist.body_list_id = body_list.id WHERE leg_activity.leg_header_id = 8 That was generated by Access's query designer. It works under Access, but passing to MySQL through ODBC, Access generates four or five queries to do the job. This make it a very long query (1 or 2 seconds), not appropriate for browsing through records. Trying to give this directly to MySQL generates an error: You have an error in your SQL syntax near '(leg_comm_hist RIGHT JOIN leg_activity ON leg_comm_hist.leg_ac' at line 2. I understand JOIN's, at least in concept, but not well enough to construct manually. Is there a tool out there similar to Access's query designer that will design MySQL compatible queries? Are there rules for convert Access queries to MySQL that I should be aware of? Thanks for any help you can give. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - 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 - 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
Perl Script: MySQL Slow Query Log Parser
I wrote a perl script that will parse slow_queries logs, and output some useful information. It's kind of hard to explain, but I'll try. I wanted to see what queries were taking a lot of time, and how often they were happening. I wrote a perl script that parses the log files, ignores queries that take less than n seconds, and normalizes the queries and reports the info for each queries sorted by query occurance. 'normalize' meaning... this... SELECT * FROM ween WHERE pandy_fackler = 1; SELECT * FROM ween WHERE pandy_fackler = 15; becomes... SELECT * FROM ween WHERE pandy_fackler = XXX; this... SELECT names FROM things WHERE name LIKE '%wazoo%'; SELECT names FROM things WHERE name LIKE '%tada%'; becomes... SELECT names FROM things WHERE name LIKE 'XXX'; This has proven to be a very interesting and useful tool. You should DL it and try it on your long_queries log file. Whoever runs mysql.com should put a copy on the website. It might just be the greatest thing ever (my program, not the website). For more info, and to get a copy, you can get it at: http://www.retards.org/mysql/index.php I'd like to hear people's thought on it. I'm the only person to test it so far, so it'd be nice to know that it works for other people. Thanks, Nathan Hendler Tucson, AZ USA http://retards.org/ - 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
BUG?: Creating a copy of a database with InnoDB tables
I have a database with a mix of myisam and innodb tables. I want to create a copy of this database (ie the database name is different but the table names and structures are the same) on the same server. When I issue the create table command I get the following error: ERROR 1005: Can't create table './new_database_name/same_table_name.frm' (errno: 137) and the table is not created. If I change the type to myisam, with everything else the same, it works fine. Similarly if I use a different table name for the new table it works fine. But if I then try to use alter table to either change the type back to InnoDB or change the name back to match the table name in the original I get the error: ERROR 2013: Lost connection to MySQL server during query and the table remains unaltered. I need InnoDB type tables for transactional support and I want the same database name so my application can refer to either database without having to search and replace all the table names. I can't find anything in the manual about this. Is it impossible to have two InnoDB tables of the same name in different databases on the same server? or is this a bug? I am using Linux kernel 2.2.17-21mdk and MySQL version 3.23.37 on off-the-shelf Intel hardware. Thanks for you help. Jonathan - 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 design for the questionnaire
As a student CGI programmer, I've been working on an online questionnaire. I have been working so hard to design the mysql db part, still I'm not sure if I've done it right. Still somethings seem to be awkward. Here I'm DESCRIBing the tables for you, then i'm explaining how I inteded to use it: mysql DESC cral2_questions; +-+---+--+-+-++-+ | Field | Type | Null | Key | Default | Extra +-+---+--+-+-++-+ | question_id | int(10) unsigned | | PRI | NULL| auto_increment | question| text | | | | | type| enum('r','c','t') | | | r | | calculate | enum('yes','no') | YES | | NULL| +-+---+--+-+-++-+ 4 rows in set (0.01 sec) mysql DESC cral2_answers; ++--+--+-+-+---+-+ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-+---+-+ | answer_id | int(10) unsigned | | | 0 | | | question_id| int(10) unsigned | | | 0 | | | answer | char(200)| | | | | | if_checked | int(10) unsigned | YES | | NULL| | | if_not_checked | int(10) unsigned | YES | | NULL| | ++--+--+-+-+---+-+ 5 rows in set (0.00 sec) The first table stores questions and the second one stores their answers. If you look at the type column, r stands for RADIO BUTTONED, which means only one of the options could be checked, c means CHECK BOXED or CHECK ALL THAT APPLY type of questions, and t stands for TEXT FIELDED, and respondent would have to type something in, which will be matched agains a respective REGEXP. CGI script also calculates the results, and provides an instant feedback depending on the score a student gets. Of course in addition to the above tables, I'll be needing a table for storing each students information by assigning an auto_incrementing number for each student, storing the the students answers, answer key table. Do you guys think I'm making it too much complicated? I can give you the link for the initial step of the application. I developed it for the experts where they rated and provided feedback for each item, according to which we had to fine-tune the questions. Since we have the fine-tuned questions now, I started working on the final part (for students). URL: http://www.ultracgis.com/cgi-bin/cral.v1.cgi You can access the questionnaire from here. And the control panel is at http://www.ultracgis.com/cgi-bin/cral.v1.cgi/ControlPanel I really need experts ideas. Thank you - -sherzodR phone: (517) 774-2702 email: [EMAIL PROTECTED] - 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: BUG?: Creating a copy of a database with InnoDB tables
At 12:11 27/06/2001 +1000, Jonathan Arthur wrote: Hi, Take a look in the err file and if you see an error like this: Innobase: error: table dbname/tablename already exists in Innobase data dictionary Means maybe you had created before the table in InnoDB and made a drop database command, which don't remove the table from InnoDB data dictionary and thereafter generates the error for you mentioned. The fix of the problem is already in the work by Heikki, the main InnoDB developer. Regards, Miguel I have a database with a mix of myisam and innodb tables. I want to create a copy of this database (ie the database name is different but the table names and structures are the same) on the same server. When I issue the create table command I get the following error: ERROR 1005: Can't create table './new_database_name/same_table_name.frm' (errno: 137) and the table is not created. If I change the type to myisam, with everything else the same, it works fine. Similarly if I use a different table name for the new table it works fine. But if I then try to use alter table to either change the type back to InnoDB or change the name back to match the table name in the original I get the error: ERROR 2013: Lost connection to MySQL server during query and the table remains unaltered. I need InnoDB type tables for transactional support and I want the same database name so my application can refer to either database without having to search and replace all the table names. I can't find anything in the manual about this. Is it impossible to have two InnoDB tables of the same name in different databases on the same server? or is this a bug? I am using Linux kernel 2.2.17-21mdk and MySQL version 3.23.37 on off-the-shelf Intel hardware. Thanks for you help. Jonathan - 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 -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Miguel A. Solórzano [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Mogi das Cruzes - São Paulo, Brazil ___/ www.mysql.com - 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
databases disappear...
For the first time developing a PHP-MySQL system, I am experiencing strange things. Perhaps it is the off-line mode (Localhost) I am running Apache in, or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a database with a standard little PHP script. Then I start working on my other PHP scripts and testing them out. Of course there are mistakes, like forgotten semicolons or a left bracket where it should be a right one (parse errors), and I correct them, untill I get a nice output on my screen. But suddenly - Offset 0 is not valid for this result set. This is a mysql_data_seek() error, but that is probably a coincidence. The point is: MySQL suddenly thinks that the database is empty, as if it was destroyed. When I look in my MYSQL directory tree, I find my database in the \data subdirectory. So it is present (3 files for each table). When I look at the date stamps for the files, all maintain their creation date/time, although I did make changes to the tables during testing - except one table, with just one row in it (my user/password), did change the timestamp, but I did not access that one (it does not work under Windows)! It get weirder. I must physically delete the database from the MySQL data directory, before I can create them anew, with the same little script I mentioned above. Usually I can access the tabels again then, but quite often, I don't see the newly created tables, but the changed version from a previous test - although I deleted those from my hard disk. So I presume there is a cache somewhere, maintained by Windows, Apache, MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? I hope I am not really damaging my database, because when I will be working with the real thing later on, I can not afford to have to start from scratch over and over again. Is there a workaround? Thanks, Marco (please mail me directly, I am not on the list) | | Marco Bleeker, Amsterdam | [EMAIL PROTECTED] | http://www.euronet.nl/users/mbleeker/ | | Attachments only after prior notice please. | Don't put me on any kind of mailing list. | | I am now receiving the Snowhite virus 4x a day | - some of you must be infected, please check ! | (No, you did not get it from me, I use Eudora) | __@ | _`\,_ |__(*)/ (*)Ah, op DIE fiets ! - 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
databases disappear...
For the first time developing a PHP-MySQL system, I am experiencing strange things. Perhaps it is the off-line mode (Localhost) I am running Apache in, or my Wintel 98SE Pentium3. So I create and populate 3 small tables in a database with a standard little PHP script. Then I start working on my other PHP scripts and testing them out. Of course there are mistakes, like forgotten semicolons or a left bracket where it should be a right one (parse errors), and I correct them, untill I get a nice output on my screen. But suddenly - Offset 0 is not valid for this result set. This is a mysql_data_seek() error, but that is probably a coincidence. The point is: MySQL suddenly thinks that the database is empty, as if it was destroyed. When I look in my MYSQL directory tree, I find my database in the \data subdirectory. So it is present (3 files for each table). When I look at the date stamps for the files, all maintain their creation date/time, although I did make changes to the tables during testing - except one table, with just one row in it (my user/password), did change the timestamp, but I did not access that one (it does not work under Windows)! It get weirder. I must physically delete the database from the MySQL data directory, before I can create them anew, with the same little script I mentioned above. Usually I can access the tabels again then, but quite often, I don't see the newly created tables, but the changed version from a previous test - although I deleted those from my hard disk. So I presume there is a cache somewhere, maintained by Windows, Apache, MySQL or PHP. Can I flush that cache? How can I stop this weird behaviour? I hope I am not really damaging my database, because when I will be working with the real thing later on, I can not afford to have to start from scratch over and over again. Is there a workaround? Thanks, Marco (please mail me directly, I am not on the list) | | Marco Bleeker, Amsterdam | [EMAIL PROTECTED] | http://www.euronet.nl/users/mbleeker/ | | Attachments only after prior notice please. | Don't put me on any kind of mailing list. | | I am now receiving the Snowhite virus 4x a day | - some of you must be infected, please check ! | (No, you did not get it from me, I use Eudora) | __@ | _`\,_ |__(*)/ (*)Ah, op DIE fiets ! - 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: Conversion from Access JOIN syntax to MySQL JOIN syntax...
Thanks! I was able to work on the query today, and manually assemble a query that did the same thing. And thus, was a lot faster. The main contention MySQL seems to have is the nested joins, such as when Access does this: FROM (((leg_version_hist RIGHT JOIN (leg_comm_hist RIGHT JOIN leg_activity ON leg_comm_hist.leg_activity_id = leg_activity.id)... For some reason MySQL doesn't like that. :) It's expecting a table name, not another JOIN. At least that what it seems to me, but I could be wrong, not being very experienced with joins. My query in MySQL ended being a lot clean looking, at least to me: SELECT leg_activity.activity_date, leg_transitions.trans_desc, leg_text.leg_version, body_list.body_name FROM leg_activity LEFT JOIN leg_comm_hist ON leg_activity.id = leg_comm_hist.leg_activity_id LEFT JOIN body_list ON leg_comm_hist.body_list_id = body_list.id LEFT JOIN leg_version_hist ON leg_activity.id = leg_version_hist.leg_activity_id LEFT JOIN leg_text ON leg_version_hist.leg_text_id = leg_text.id LEFT JOIN leg_transitions ON leg_activity.transition_id = leg_transitions.id WHERE leg_activity.leg_header_id = 8 And it works very well. I'm happy. :) Thanks for the pointers! j- k- On Tuesday 26 June 2001 17:57, Rolf Hopkins wrote: As it is such a big query, I don't have time to look at it for you but it may be easier if you convert the RIGHT JOINS to LEFT JOINS for starters. The manual does recommend LEFT JOINS, mainly for portability. First part would be something like (leg_activity LEFT JOIN leg_comm_hist ON (leg_comm_hist.leg_activity_id = leg_activity.id) LEFT JOIN leg_version_hist ON leg_version_hist.leg_activity_id = leg_activity.id) - Original Message - From: Joshua J. Kugler [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Wednesday, June 27, 2001 2:47 Subject: Conversion from Access JOIN syntax to MySQL JOIN syntax... Yes, I've read the docs on JOIN syntax, and search the list archives for similar information. I have this query: SELECT leg_activity.activity_date, leg_transitions.trans_desc, leg_text.leg_version, body_list.body_name FROM (((leg_version_hist RIGHT JOIN (leg_comm_hist RIGHT JOIN leg_activity ON leg_comm_hist.leg_activity_id = leg_activity.id) ON leg_version_hist.leg_activity_id = leg_activity.id) LEFT JOIN leg_text ON leg_version_hist.leg_text_id = leg_text.id) INNER JOIN leg_transitions ON leg_activity.transition_id = leg_transitions.id) LEFT JOIN body_list ON leg_comm_hist.body_list_id = body_list.id WHERE leg_activity.leg_header_id = 8 That was generated by Access's query designer. It works under Access, but passing to MySQL through ODBC, Access generates four or five queries to do the job. This make it a very long query (1 or 2 seconds), not appropriate for browsing through records. Trying to give this directly to MySQL generates an error: You have an error in your SQL syntax near '(leg_comm_hist RIGHT JOIN leg_activity ON leg_comm_hist.leg_ac' at line 2. I understand JOIN's, at least in concept, but not well enough to construct manually. Is there a tool out there similar to Access's query designer that will design MySQL compatible queries? Are there rules for convert Access queries to MySQL that I should be aware of? Thanks for any help you can give. -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - 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 - 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 -- Joshua Kugler, Information Services Director Associated Students of the University of Alaska Fairbanks [EMAIL PROTECTED], 907-474-7601 - 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
Select and = MAX()
Following the Tutorial Creating and populating the table Shop in the db Test.. Why won't the following syntax work? mysql select price - from shop - where price=Max(price) ; ERROR : Invalid use of group function Bob T - 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: Select and = MAX()
Why bother when the following works: mysql SELECT price FROM shop ORDER BY price DESC LIMIT 1; On Tue, 26 Jun 2001, R Talbot wrote: Following the Tutorial Creating and populating the table Shop in the db Test.. Why won't the following syntax work? mysql select price - from shop - where price=Max(price) ; ERROR : Invalid use of group function Bob T - 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 - 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