RE: How to query and return nearest value...
Try something like this SELECT price, min(abs(price-value)) as Mini from table group by price order by Mini LIMIT 1 Patrick -Message d'origine- De : Robert Badaracco [mailto:[EMAIL PROTECTED]] Envoy : mercredi 24 janvier 2001 05:47 : [EMAIL PROTECTED] Objet : How to query and return nearest value... Hi, I have a range of decimal numbers (Prices) in a table column that I'd like to run a query against. I'd like to run a query with a value that returns the closest price to that value if it can't find a match. Is there some function that I can use in my query that will allow me to do this? Thanks, Bob - 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: Direct use of MyISAM in applications.
I'm afraid there is absolutely no documentation. You can look for some examples in the MYISAM sources directory. You just have to be aware that this API is not available in Client/Server mode. Furthermore, I don't think it will be possible to access the same data through SQL and Isam at the same time because of concurrency problems... Patrick -Message d'origine- De : Justin C. Darby [mailto:[EMAIL PROTECTED]] Envoy : mardi 23 janvier 2001 18:50 : [EMAIL PROTECTED] Objet : Direct use of MyISAM in applications. Can anyone give me more information on directly using MyISAM directly in applications? I'd heard that it was possible, but haven't ever seen any information relating to the subject appear on this list. (I know there's a libmyisam, but I don't know what to do with it beyond that..) Is the API documented at all? Thanks, Justin C. Darby - 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: MORE basics!!
Hi Mac, Please read up on the security setup Section 6 (c:\mysql\docs) before continuing. First understand before try. Regards Jacques -Original Message- From: Mac Martine [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 08:17 To: Jacques Venter Cc: [EMAIL PROTECTED] Subject: Re: MORE basics!! I'm getting closer Thanks again!!! I have my root account set up on my local machine. I guess I need to figure out how to set up an account for my remote server. Does that sound right? Sorry, I'm still trying to grasp how this all works. Thanks to your help, I have figured out how to see my databases and tables through the mysql.exe prompt box. I havent done anything in DOS...i dont think i need to at this point, but i could be wrong. So, I'm not sure how to set permissions on a remote file...I cant find a way to change my 'localhost' to 'mydomain.com'. Isnt that what I want to do somehow? Thanks! Mac - Original Message - From: Jacques Venter [EMAIL PROTECTED] To: Mac Martine [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 1:18 AM Subject: RE: basics!! Hi Mac, You should not be typing DOS commands within the mysql.exe utility, do the following exactly: Get yourself here: C:\ Type: cd mysql\bin ENTER Result: c:\mysql\bin Type: mysqld-nt --install ENTER Result: c:\mysql\bin Type: net start mysqlENTER Result: MySQL Service has started successfully Type: mysqlENTER Result: You are now within the mysql command line utility and are supposed to type sql, not DOS commands. Type: use mysql; select * from user;ENTER Result: See a list of your user security table Type: quitENTER Result: Back to DOS: c:\mysql\bin i also tried typing: mysqladmin -uroot -password **; Now that your mysql is running you can try this again. If you post to the mailing list again, please provide your operating system. No offense intended, but you should get yourself a GUI MySQL Client Regards - 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: 3.23.31 gives FULLTEXT problems on sparc64 Linux
Hello I wrote: After upgrading to 3.23.31, FULLTEXT selects give often "error -1 from table handler" for me. [...] Sergei Golubchik [EMAIL PROTECTED] wrote: Thanks for a bug report! This would be fixed in a nex release. Thanks. In 3.23.32 the test case I submitted apparently works better, but bad things still happen, like the following table corruption: DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( id mediumint unsigned NOT NULL auto_increment, tag char(6) NOT NULL default '', value text NOT NULL default '', PRIMARY KEY (id), KEY kt(tag), KEY kv(value(15)), FULLTEXT KEY kvf(value) ) TYPE=MyISAM; DROP TABLE IF EXISTS t2; CREATE TABLE t2 ( id_t2 mediumint unsigned NOT NULL default '0', id_t1 mediumint unsigned NOT NULL default '0', field_number tinyint unsigned NOT NULL default '0', PRIMARY KEY (id_t2,id_t1,field_number), KEY id_t1(id_t1) ) TYPE=MyISAM; INSERT INTO t1 (tag,value) VALUES ('foobar','baz'); INSERT INTO t2 VALUES (1,1,1); CHECK TABLE t1; The error says: "Can't read indexpage from filepos: -1". Moreover, myisachk isn't able to repair it! (neither -r nor -o). Tested on both sparc64-linux (sun4u) and sparc-solaris2.6 (sun4m). cheers -- TS - 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
Junction entities VS. JOIN
I'm afraid this borders on sql/db question material vs. specific mysql material, but it stems from what I've read in the O'Reilly mysql book. If I have a db, which has two tables that have about 15 fields each. table_atable_b a_idb_id a_field1 b_field1 .. .. a_field14b_field14 and they have a many to many relationship between them. Should I a. Create a normalized junction entity.? table_ab ab_id a_id b_id or do I b. Just do a JOIN between the tables? If choice a., how do I do the indexing so that searches for b_id based on a a_id value are fast, and vice-versa? thanks --Dylan Shea - 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: Any MySQL webhosts that allow 'load data infile' statement ?
have you tried phpwebhosting.com, small but friendly, and amenable to many requests. -Original Message- From: Margot [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 12:56 AM To: [EMAIL PROTECTED] Subject: Any MySQL webhosts that allow 'load data infile' statement ? Does anyone know of any reputable PHP/MySQL webhosting companies that allow clients to use the "load data ... infile" statement? Many enquiries to well known webhosts have resulted in a universal '"no". - 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
Insert problem in MYSQL with PHP
Hi I've got a problem about Mysql table. if I insert several records in a certain order, firstly it is ok, but when I delete them and insert those records again (in the same sequence), But the order in MySql is totally different. For instance, I have 78 records, when I do insert secondly, it dispalys 58th record firstly and others in reverse order. Anybody know why? (I use PHP script) Thank you in advance. Xinkun WANG _ 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
High-load/SMP/Linux/sql-bench
In order to verify and perhaps solve the SMP problems I and others have reported to this list I did a series of sql-bench tests this morning. As suggested by the MySQL people the system is configured with glibc 2.2 and 2.4 kernel. I then switched kernels to the default 2.2.16 SMP and ran the tests again. Setup: Dual Pentium!!! 866MHz 512MB Ram, UW SCSI RedHat Linux 7.0 v2(Respin) MySQL 3.23.32 my.cnf: [client] port= 3306 socket = /tmp/mysql.sock [mysqld] port= 3306 socket = /tmp/mysql.sock skip-locking set-variable= key_buffer=128M set-variable= max_allowed_packet=1M set-variable= table_cache=128 set-variable= sort_buffer=1M set-variable= record_buffer=1M set-variable= net_buffer_length=8K set-variable= myisam_sort_buffer_size=64M set-variable= thread_cache=8 set-variable= thread_concurrency=4 set-variable= max_connections=250 log-update [mysqldump] quick [mysql] no-auto-rehash [isamchk] set-variable= key_buffer=64M set-variable= sort_buffer=64M set-variable= read_buffer=2M set-variable= write_buffer=2M [myisamchk] set-variable= key_buffer=64M set-variable= sort_buffer=64M set-variable= read_buffer=2M set-variable= write_buffer=2M [mysqlhotcopy] interactive-timeout glibc-2.2-12 (.rpm) gcc-2.96-69 (.rpm) Kernels: 2.2.16SMP from default install 2.4SMP compiled from source First test: -- sql-bench setup: Benchmark DBD suite: 2.11a Date of test:2001-01-24 8:58:30 Running tests on:Linux 2.4.0 i686 Arguments: Comments: Limits from: mysql,mysql,pg,solid Server version: MySQL 3.23.32 log ATIS: Total time: 26 wallclock secs ( 4.84 usr 2.25 sys + 0.00 cusr 0.00 csys = 7.09 CPU) alter-table: Total time: 143 wallclock secs ( 0.10 usr 0.03 sys + 0.00 cusr 0.00 csys = 0.13 CPU) big-tables: Total time: 24 wallclock secs ( 5.66 usr 4.44 sys + 0.00 cusr 0.00 csys = 10.10 CPU) connect: Total time: 24 wallclock secs (12.47 usr 3.70 sys + 0.00 cusr 0.00 csys = 16.17 CPU) insert: Total time: 1119 wallclock secs (254.38 usr 87.85 sys + 0.00 cusr 0.00 csys = 342.23 CPU) select: Total time: 739 wallclock secs (35.62 usr 7.38 sys + 0.00 cusr 0.00 csys = 43.00 CPU) wisconsin: Total time: 11 wallclock secs ( 2.38 usr 1.09 sys + 0.00 cusr 0.00 csys = 3.47 CPU) -- seconds usr sys cpu tests TOTALS 2124.00 315.43 106.74 422.171875011 -- Second test: sql-bench setup: --- Benchmark DBD suite: 2.11a Date of test:2001-01-24 9:44:55 Running tests on:Linux 2.2.16-22smp i686 Arguments: Comments: Limits from: mysql,mysql,pg,solid Server version: MySQL 3.23.32 log ATIS: Total time: 26 wallclock secs ( 5.50 usr 2.29 sys + 0.00 cusr 0.00 csys = 7.79 CPU) alter-table: Total time: 176 wallclock secs ( 0.21 usr 0.07 sys + 0.00 cusr 0.00 csys = 0.28 CPU) big-tables: Total time: 25 wallclock secs ( 6.26 usr 4.13 sys + 0.00 cusr 0.00 csys = 10.39 CPU) connect: Total time: 29 wallclock secs (14.97 usr 4.12 sys + 0.00 cusr 0.00 csys = 19.09 CPU) insert: Total time: 1274 wallclock secs (326.70 usr 102.33 sys + 0.00 cusr 0.00 csys = 429.03 CPU) select: Total time: 746 wallclock secs (41.49 usr 10.66 sys + 0.00 cusr 0.00 csys = 52.15 CPU) wisconsin: Total time: 11 wallclock secs ( 2.91 usr 1.19 sys + 0.00 cusr 0.00 csys = 4.10 CPU) -- seconds usr sys cpu tests TOTALS 2326.00 398.02 124.79 522.811875011 -- The conclusion is that the 2.4 kernel obviously helps. Even where the tests total time are equal the 2.4 kernel generally consumes less cpu. I did however not manage to "crash" MySQL during the tests with the 2.2.16SMP kernel. This may be because the tests isn't as load intensive as the load my production servers get, or it may be related to a better performing glibc 2.2 (The production servers run RedHat 6.2 with glibc 2.1 and kernel 2.2.16SMP). In other words it remains to be seen if the 2.4 kernel paired with glibc-2.2 resolves my current problems where mysql goes belly-up under load. Any suggestions to further test will be appreciated. regards Rune Hansen [EMAIL PROTECTED] Viventus AS Liaveien 11, 1411 Kolbotn +4766812280/86 "It's a damn poor mind that can only think of one way to spell a word." --Andrew Jackson
RE: Insert problem in MYSQL with PHP
This has nothing to do with PHP, and you should never expect a relational database to store records in a specific order. If you need to order your data, you should create a key field. Look up AUTO INCREMENT in the manual, then, if you have trouble, read http://www.bitbybit.dk/mysqlfaq/faq.html#ch6_0_0. Use that column to sort your result (look up ORDER BY in the manual) / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq -Original Message- From: Xinkun Wang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 12:10 PM To: [EMAIL PROTECTED] Subject: Insert problem in MYSQL with PHP Hi I've got a problem about Mysql table. if I insert several records in a certain order, firstly it is ok, but when I delete them and insert those records again (in the same sequence), But the order in MySql is totally different. For instance, I have 78 records, when I do insert secondly, it dispalys 58th record firstly and others in reverse order. Anybody know why? (I use PHP script) Thank you in advance. Xinkun WANG _ 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 - 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: Junction entities VS. JOIN
I'm afraid this borders on sql/db question material vs. specific mysql material, but it stems from what I've read in the O'Reilly mysql book. If I have a db, which has two tables that have about 15 fields each. cut and they have a many to many relationship between them. Should I a. Create a normalized junction entity.? Yes. table_ab ab_id a_id b_id Almost right: You don't need an ab_id column. You should, however, in most cases make the key (a_id, b_id) UNIQUE. or do I b. Just do a JOIN between the tables? Not unless you have very little data in your tables or a lot of patience when doing queries. Besides, It won't do exactly what you need anyway so you'd end up doing some post-analysis. If choice a., how do I do the indexing so that searches for b_id based on a a_id value are fast, and vice-versa? By indexing both a_id and b_id. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - 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: write problems via MS Access 97 in table with timestamp andprimary key
One of our users is getting the message "another user has changed this database..etc save changes to clipboard or drop changes... etc", when he tries to update certain fields in the table. The table has a timestamp and a primary key. In fact, this user can change certain fileds without difficulty for certain types of data and not for others (i.e. Access accepts changes when the data is a document but not when its a collection). To make things more confusing., other users can change all fields in the same table via Access without receiving the error message. Any one else had and solved this problem? Susan Albright Ma'am, this is an ODBC problem, not a MySQL problem. I assume that the table is a linked table in Access. How is it accessed? Directly, through a query, or through a form? Are there any joins? Does the problem occur only through a query or form that joins the table with another table? What do you mean by 'the data is a document' and 'its a collection'? These aren't MySQL or Jet datatypes. What is the user who's having problems doing that the other users aren't doing? Things that people have done to solve this include dropping and adding primary keys and timestamp fields, setting up relationships between tables as much as possible (you can set up a relationship between linked tables, but I don't think you can specify what the relationship is), and selecting UniqueRecords in queries (DISTINCTROW in SQL). Bob Hall Know thyself? Absurd direction! Bubbles bear no introspection. -Khushhal Khan Khatak - 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: Junction entities VS. JOIN
Thanks. (I don't know where I was coming from with the JOIN stuff, should have gone to bed hours ago) However, you don't think I should have the "ab_id" column, which would be the standard serial primary key for a table. Does a junction entity table not need it's own record ids? Technically, it shouldn't, but does good db form require it? or is a junction entity normalization table exempt from that? thanks again --Dylan Shea "Carsten H. Pedersen" wrote: I'm afraid this borders on sql/db question material vs. specific mysql material, but it stems from what I've read in the O'Reilly mysql book. If I have a db, which has two tables that have about 15 fields each. cut and they have a many to many relationship between them. Should I a. Create a normalized junction entity.? Yes. table_ab ab_id a_id b_id Almost right: You don't need an ab_id column. You should, however, in most cases make the key (a_id, b_id) UNIQUE. or do I b. Just do a JOIN between the tables? Not unless you have very little data in your tables or a lot of patience when doing queries. Besides, It won't do exactly what you need anyway so you'd end up doing some post-analysis. If choice a., how do I do the indexing so that searches for b_id based on a a_id value are fast, and vice-versa? By indexing both a_id and b_id. / Carsten -- Carsten H. Pedersen keeper and maintainer of the bitbybit.dk MySQL FAQ http://www.bitbybit.dk/mysqlfaq - 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
ArabiaSoft and NuSphere
Any comments on the packages from ArabiaSoft and NuSphere? Thanks Frank - 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: Direct use of MyISAM in applications.
Justin C. Darby writes: Can anyone give me more information on directly using MyISAM directly in applications? I'd heard that it was possible, but haven't ever seen any information relating to the subject appear on this list. (I know there's a libmyisam, but I don't know what to do with it beyond that..) Is the API documented at all? Thanks, Justin C. Darby Documentation for MyISAM is included in our latest 3.23 releases. You will find it in Docs subdirectory of the source distro. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - 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: ArabiaSoft and NuSphere
I've found Abriasoft SQL Standard to be really really great. I've made apache/ssl/php etc. systems from source tarballs, and it takes hours, and there is all kinds of frustration and hassle. You can do the same, and it takes minutes, and really does it _almost right_. They seemed to miss the functions.js file that belongs in phpMyAdmin, but it's easily picked up and placed by grabbing a copy of the phpMyAdmin tarball from phpwizards.net. The other is you'll want to grab the MySQL updates due to security issues and bugs in the version of MySQL in the Abriasoft package. b.t.w. I was using the the RH7 Linux version. Installing Abriasoft SQL on top of a fresh RH7 install will solve you a lot of hassle due to bugs in key RH7 packages. --Dylan Shea "Frank J. Schmuck" wrote: Any comments on the packages from ArabiaSoft and NuSphere? Thanks Frank - 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 compile error on solaris 2.5.1
Graeme B. Davis writes: Any ideas on this error? I'd love to use fulltext, but the last server that compiled for me was 3.23.14 :( c++ -DMYSQL_SERVER -DDEFAULT_MYSQL_HOME="\"/var/home/ap psweb/newmysql\"" -DDATADIR="\"/var/home/appsweb/newmysql/ var\"" -DSHAREDIR="\"/var/home/appsweb/newmysql/share/m ysql\"" -DHAVE_CONFIG_H -I./../include -I./../regex-I. -I../include -I.. -I.-O3 -DD BUG_OFF -fno-implicit-templates -DHAVE_RWLOCK_T -DSOLARIS -c sql_base.cc sql_base.cc: In function `bool table_is_used(struct st_table *, bool)': sql_base.cc:1137: parse error before `)' What compiler and which version are you using on which Solaris ?? Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - 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: Get C++ api demo
Hi: I use 3.22 and KDevelop 1.0 beta 4. =20 Please send to me if you have C++ api demo. Thank you! Hi! You can find dozen of C++ API demos in the source distro of MySQL++ API library, on our site. Regards, Sinisa __ _ _ ___ == MySQL AB /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic /*/ /*/ /*/ \*\_ |*| |*||*| mailto:[EMAIL PROTECTED] /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Larnaka, Cyprus /*/ /*/ /*/\*\_/*/ \*\_/*/ |*| /*/^^^\*\^^^ /*/ \*\Developers Team - 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
Isam Error
Hi Can anybody tell me what this error means user@server#isamckh -av database/*.ISM isamchk: error: 22 when opening ISAM-table 'database/tax.ISM'(all tables) System is RedHat 7.0 i386 SMP Standard Kernel mysql-3.22.32 standard compile from source --prefix=/usr/local/mysql Ive tried with/without large file support. The database otherwise works fine. It was created from a mysqldump from another server running exactly the same setup. perror reports "Invalid Argument" Any clues? Stuart Fox - 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: ArabiaSoft and NuSphere
Dylan, Can you comment on the use of Perl vs. PHP with either of these? Thanks Frank -Original Message- From: Dylan Shea [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 7:06 AM To: Frank J. Schmuck Cc: [EMAIL PROTECTED] Subject: Re: ArabiaSoft and NuSphere I've found Abriasoft SQL Standard to be really really great. I've made apache/ssl/php etc. systems from source tarballs, and it takes hours, and there is all kinds of frustration and hassle. You can do the same, and it takes minutes, and really does it _almost right_. They seemed to miss the functions.js file that belongs in phpMyAdmin, but it's easily picked up and placed by grabbing a copy of the phpMyAdmin tarball from phpwizards.net. The other is you'll want to grab the MySQL updates due to security issues and bugs in the version of MySQL in the Abriasoft package. b.t.w. I was using the the RH7 Linux version. Installing Abriasoft SQL on top of a fresh RH7 install will solve you a lot of hassle due to bugs in key RH7 packages. --Dylan Shea "Frank J. Schmuck" wrote: Any comments on the packages from ArabiaSoft and NuSphere? Thanks Frank - 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: Can't compile on Solaris 2.7
Chuck I'm trying to compile 3.23.31 on Solaris 2.7 also, and had the same problem. If you either delete or rename the config.cache file, this will go away. The config.cache file supplies default values to the configure script, and those default values weren't suitable for our Solaris installation. Deleting (preferably renaming) the config.cache file forced the configure script to build its own cache file. If your OS installation is like ours, you may have later problems when configure attempts to determine the size of a char variable. You'll need to have the directory containing libz.so in your LD_LIBRARY_PATH. I'm still not finished with my source installation. Now my Makefile won't complete. Arrggh! Chet Singer Chuck Carson wrote: I am getting this error trying to compile mysql 3.23.28: checking for pdftex... no checking return type of sprintf... configure: error: can not run test program while cross compiling The documentation says the compiler is not installed correctly. I tried the gcc2.8.1 and 2.9.5 packages from sunfreeware.com. Anyone have any ideas? -Chuck - 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: Corrupted tables
I've had some db corruption on a few occasions, and luckily I was running the following in a nightly cron...it has since first install saved my butt on many an occasion. http://www.ocsny.com/main/index.ocs?url=mysqlbackup It doesn't do anything magickal just uses mysqldump and a basic routine to auto discover the databases in your db and print them into straight sql...I have another cron job that runns shortly after that tars the data to tape and then they can be erased from disk... cheers, mikel "Kissandrakis S. George" wrote: Hello I have mysql 3.23.31 on x86 linux Some big tables .ISM get corrupted without any crash or shutdown of mysqld Any suggestions? -- Kissandrakis S. George [[EMAIL PROTECTED]] Network and System Administrator [http://www.phaistosnetworks.gr/] Tel/Fax: (+30 892) 24450/23206 Phaistos Networks S.A. - A DOL Digital Company - 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
BDB Tables
Will someone from the MySQL team (or anyone with this knowledge) please tell me if the test suite has been run with RedHat 7.0 and Berkeley tables? I am currently running RedHat 6.2 and Berkeley tables and transactions DO work. I want to upgrade to RedHat 7.0, but not if transactions stop working. Please advise. - / Rick Mehalick Senior Consultant / Shell Services International SSI-GPAX / Phone: 281-544-5092(WCK) / Fax:281-544-2646(WCK) / 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
Problems making source dist. on Solaris
Hi all, I'm making a source distribution on Solaris. Partway through the 'make install', I get this: make[1]: Entering directory `/home/csinger/mysql/mysql-3.23.31/libmysql' make[1]: *** No rule to make target `libmysql.c', needed by `libmysql.lo'. Stop. A quick look in my libmysql directory shows nothing there but these files: Makefile Makefile.am Makefile.in Makefile.shared acinclude.m4 configure.in Meanwhile, in my libmysql_r directory, there are lots of .c files, including libmysql.c, but these are links that point to files in the libmysql directory that don't exist. For example, libmysql_r/libmysql.c is a link that points to libmysql/libmysql.c, which doesn't exist. My configure script seemed to run OK. Anyone have any ideas? Thanks. Chet - 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: Download of MySQL
Well, it's not me, I found it with no problems. 1. Click on "Downloads" 2. Click on the first link under "MySQL database" (helpfully labelled "Stable release, recommended") 3. Select your OS. Seems sensible enough. Cheers Jon -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 14:30 To: MYSQL List Subject: Download of MySQL Hi Is it just me who thinks it is very difficult to find the right download-location for MySQL (when you have Windows 95, or Windows 98) on the mysql.com-site? /Gustav Wiberg - 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
recovery help
Hi! The mysql server (version 3.22.32-4) has hanged up, and the restarting causes a part of the *.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup from these files :( Is there any method to recover the mysql tables from the remaining *.MYD, *MYI and *.frm files ? Thanks for ANY help!!! Attila - 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: Download of MySQL
Actuall, I agree with the earlier post, I did find that sometimes the download connection to SourceForge quits half-way during the download. My recommendation would be to try one of the mirror sites and download from there since I don't think that they use SourceForge. Good Luck, Dennis - Original Message - From: "Jon Haworth" [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 9:34 AM Subject: RE: Download of MySQL Well, it's not me, I found it with no problems. 1. Click on "Downloads" 2. Click on the first link under "MySQL database" (helpfully labelled "Stable release, recommended") 3. Select your OS. Seems sensible enough. Cheers Jon -Original Message- From: Gustav Wiberg [mailto:[EMAIL PROTECTED]] Sent: 24 January 2001 14:30 To: MYSQL List Subject: Download of MySQL Hi Is it just me who thinks it is very difficult to find the right download-location for MySQL (when you have Windows 95, or Windows 98) on the mysql.com-site? /Gustav Wiberg - 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
Index question
Say I have a table called Discharge that is indexed on Vessel + Voyage + Port (Primary Key). It has thousands of records in it and continuously grows. I now want to delete records where Vessel = "USS ENTERPRISE" Voyage = "005" I want to delete all records with the above Vessel/Voyage. There can be anywhere from 1 to 20 records with that match (different Port). My SQL statement is: DELETE FROM Discharge where Vessel = "USS ENTERPRISE" AND Voyage = "005"; My question is one pertaining to performance. Will MySQL scan through the entire table or will it utilize the index and quickly delete all record with the above statement? If the former, what would be an efficient and quick way to delete records of a partial key? Thanks, Don - 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: recovery help
Steve Ruby wrote: Elekes Attila wrote: Hi! The mysql server (version 3.22.32-4) has hanged up, and the restarting causes a part of the *.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup from these files :( Is there any method to recover the mysql tables from the remaining *.MYD, *MYI and *.frm files ? Thanks for ANY help!!! Attila First you should backup what you do have left of your files. There just incase you mess things up worse trying to fix them. Then, on a copy of the "bad" tables have you tried running myisamchk -r tablename.MYI or atleast myisamchk tablename.MYI so you can tell how bad off they are, mysql may simply be able to fix them itself. See also CHECK TABLE and REPAIR TABLE in the mysql manual - 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 Hello Steve! First, thank you very much for your help. I tried to run the myisamchk, the tables looks good and the result is e. g.: # myisamchk -r TurosHat.MYI Checking MyISAM file: CikktorzsTaki.MYI Data records: 17 Deleted blocks: 0 - check file-size - check key delete-chain - check record delete-chain - check index reference - check records and index references After running the myisamchk, I tried to check and repair the table: mysql check table CikktorzsTaki; ERROR 1064: You have anmysql check table CikktorzsTaki; mysql repair table CikktorzsTaki; ERROR 1064: You have an error in your SQL syntax near 'check table CikktorzsTaki' at line 1 Have you got any idea ? Attila - 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: Connection to remote Mysql Server.
How about Putty? It is very simple, but it fulfills most of your needs. http://www.chiark.greenend.org.uk/~sgtatham/putty/ // Tobias - Original Message - From: "Rajesh Prakasan" [EMAIL PROTECTED] To: "Mysql" [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 2:03 PM Subject: Connection to remote Mysql Server. where will I get SSH client for Windows, so that it can interact with Linux Mysql server. Rajesh. - 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: recovery help
Elekes Attila wrote: Steve Ruby wrote: Elekes Attila wrote: Hi! The mysql server (version 3.22.32-4) has hanged up, and the restarting causes a part of the *.ISM and *.ISD files are gone. Unfortuanetly, I have not got a backup from these files :( Is there any method to recover the mysql tables from the remaining *.MYD, *MYI and *.frm files ? Thanks for ANY help!!! Attila I may have confused things here.. sorry... If you have version 3.22.32 you Cannot use the MYI and MYD files those are the MyISAM tables, the ISM and ISD files are ISAM tables which were the starndard format for pre 3.23 versions... If you are running 3.22.32 how did you get MYI and MYD files? You should have only one or the other depending on the type fo the tables and with 3.22.x you must have only the ISM/ISD files. Can you explain what happend? If you converted the tables from ISAM to MyISAM format the MYD .IS* filew will go away, but you will be required to use 3.23.x version with the .MY* files - 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
php 4.0.4 + MySQL 3.23.32 with charset different from latin1
I have a problem with mysql_connect() when use character set for MySQL server different from default (latin1). Every time when I change charset PHP says: Warning: MySQL Connection Failed: Can't initialize character set 17 (path: default) I've try to recompile PHP when MySQL compiled by default with character set cp1251, but PHP report again this error. In other side console mysql client working fine with everything character set. What can I do ? 10x in @vance Boril
Re: Connection to remote Mysql Server.
www.ssh.com where will I get SSH client for Windows, so that it can interact with Linux Mysql server. - 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
isamchk and myisamchk inconsistently report errors
I have had the following problem with both mysql 3.22 (using isamchk) and 3.23 (using myisamchk). I use either isamchk table.ISM or isamchk -e table.ISM. The utility reports a miscellaneous error (error: Record at: 20224201 Can't find key for index: 2 for example). I run the check again immediatelly and the error has dissapeared. I assume simply doing a check is a read only operation so how is this possible if the data file is not changing? I went as far as doing a diff on tables before and after the check to make sure nothing changes and it seems to be read only. I have also made absolutelly sure the database is down so nothing is writing to the files. Has anyone experienced this before? thanks, Mark. - 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 on installing MySQL in AIX powerPC
Dear MySQL supporter, I tried to install MySQL version 3.23.32 on our AIX machine but got errors. Source compilation also failed. Here are the situation I worked and attached are error log files. Binary Installation released file : mysql-3.23.32-ibm-aix4.3.3.0-rs6000.tar.gz error log from executing mysqlbug script : mysqlbug error display on monitor : mysqlCmdLog Source Compilation released file : mysql-3.23.32.tar.gz (tarball version) error log : mysqlSrcCmpErrLog Symptom : there is no libpthread.a in the system library. Instead, libpthreads.a in the /lib directory. I copied libpthreads.a to libpthread.a but it failed again. Thanks. Hyup Cho ([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
Problem on installing MySQL in AIX powerPC
Here are attached files: mysqlbug mysqlCmdLog mysqlSrcCmpErrLog --- Dear MySQL supporter, I tried to install MySQL version 3.23.32 on our AIX machine but got errors. Source compilation also failed. Here are the situation I worked and attached are error log files. Binary Installation released file : mysql-3.23.32-ibm-aix4.3.3.0-rs6000.tar.gz error log from executing mysqlbug script : mysqlbug error display on monitor : mysqlCmdLog Source Compilation released file : mysql-3.23.32.tar.gz (tarball version) error log : mysqlSrcCmpErrLog Symptom : there is no libpthread.a in the system library. Instead, libpthreads.a in the /lib directory. I copied libpthreads.a to libpthread.a but it failed again. Thanks. Hyup Cho ([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
Displaying Date correctly
Hi all, I was wondering how I can display a date in this format 'DD/MM/YY' As when I do a select statement and display the date I get it in this format 'DD-MM-YYY 00:00:00' Which is kind of annoying. I am using mySQL and also PHP. Thanks in advance. Sam Rose - 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
HELP!!
Dear, I am Tomcat 3.2 user and it is running on Windows 2000 Professional. I used MS Access and Tomcat crashed everytime. So I downloaded MySql (mm.mysql-2.0.1-bin.jar for JDBC , MySQL3.23, MyODBC ) and still Tomcat is crashing. I think the problem would be memory leaking caused by JDBC-ODBC bridge I really appreciate your help. Thank you in advance. Paul Yoon - 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
Replication questions
I'm doing NIDS work as a small part of my job and have setup MySQL 3.22.32 for logging of alerts. My problem is that when a user accesses the db it gets locked and the NIDS hangs if the read takes too long, forcing a reboot of the NIDS box. I'm trying to determine if I replicate the db and do the reads on the slave is it possible to make changes to the slave that will propogate back to the db that the NIDS is logging to? I did read the information that I found at http://www.mysql.com/doc/R/e/Replication.html and saw a mention of 2-way replication in the FAQ, but no obvious documentation on setting up such a beast. Any help is greatly appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: automation question: How do I copy the data from one table to another table with a time stamp every night?
Chuck Barnett wrote: How do I copy the data from one table to another table with a time stamp every night? example: table A contains x,y,z. at midnight, I want to copy table A's contents to table B (B has same fields, just adds a date field) and reset x,y,z to zero. what do you mean by "reset to zero" If you want to copy the files from A to B you can just do insert into B select x,y,z,now() from A; delete form a; if your date field in B is a TIMESTAMP type you can avoid the now() part and do inesrt into B (x,y,z) select x,y,z from A; delete from a; See the manual about the insert statement for more info. - 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
Problems with RPM installation
Why am I getting this error. Is the rpm program not working. I am running as user admin not root. I was told that I can still install mysql without using the root user. The only thing i know is that when I went to that directory below I don't have permission to write to that directory. I am not a expert in network administration. I just want some reasoning behind this error. failed to open //var/lib/rpm/packages.rpm error: cannot open //var/lib/rpm/packages.rpm - 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: automation question: How do I copy the data from one table to another table with a time stamp every night?
Thanks for replying. I know the SQL commands, I want to know how to automate the whole sequence. I've always written php pages that do the calls. I want to write a script to do it on the server as a cron job or something. thanks Chuck - Original Message - From: "Steve Ruby" [EMAIL PROTECTED] To: "Chuck Barnett" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 12:34 PM Subject: Re: automation question: How do I copy the data from one table to another table with a time stamp every night? Chuck Barnett wrote: How do I copy the data from one table to another table with a time stamp every night? example: table A contains x,y,z. at midnight, I want to copy table A's contents to table B (B has same fields, just adds a date field) and reset x,y,z to zero. what do you mean by "reset to zero" If you want to copy the files from A to B you can just do insert into B select x,y,z,now() from A; delete form a; if your date field in B is a TIMESTAMP type you can avoid the now() part and do inesrt into B (x,y,z) select x,y,z from A; delete from a; See the manual about the insert statement for more info. - 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: automation question: How do I copy the data from one table to another table with a time stamp every night?
Chuck Barnett wrote: Thanks for replying. I know the SQL commands, I want to know how to automate the whole sequence. I've always written php pages that do the calls. I want to write a script to do it on the server as a cron job or something. Ahhh, pardon my confusion, since this the MySQL list I presumed you were asking a mysql question. Your question is a cron/unix/php question not a mysql question.. there are many options one would be to wite a PHP script that does exactly what you need it to do when you "hit" it then simply put a cron job in that looks like lynx url to my php script If you don't know cron you'll have to read the man crontab to understand the format of the crontab file or cron on your system, if you are using redhat you can simply put an executeable script with the above line in it in the /etc/cron.X directory where X is the interval you want it to run, daily for example. - 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: automation question: How do I copy the data from one table to another table with a time stamp every night?
if you've compiled php without apache support (separately from your normal php with apache support) but with mySQL then you can write php scripts that run from the command line. I usually keep a second php.ini for command line scripts because they can run long. This all could be put in a CRON job. 'course you could do it in PERL as well. Cal http://www.calevans.com -Original Message- From: Chuck Barnett [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 12:22 PM To: Steve Ruby Cc: [EMAIL PROTECTED] Subject: Re: automation question: How do I copy the data from one table to another table with a time stamp every night? Thanks for replying. I know the SQL commands, I want to know how to automate the whole sequence. I've always written php pages that do the calls. I want to write a script to do it on the server as a cron job or something. thanks Chuck - Original Message - From: "Steve Ruby" [EMAIL PROTECTED] To: "Chuck Barnett" [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 12:34 PM Subject: Re: automation question: How do I copy the data from one table to another table with a time stamp every night? Chuck Barnett wrote: How do I copy the data from one table to another table with a time stamp every night? example: table A contains x,y,z. at midnight, I want to copy table A's contents to table B (B has same fields, just adds a date field) and reset x,y,z to zero. what do you mean by "reset to zero" If you want to copy the files from A to B you can just do insert into B select x,y,z,now() from A; delete form a; if your date field in B is a TIMESTAMP type you can avoid the now() part and do inesrt into B (x,y,z) select x,y,z from A; delete from a; See the manual about the insert statement for more info. - 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: write problems via MS Access 97 in table with timestamp and primary key
I used to get this all the time, myself, when I was trying to update a mysql database with Access 2000 through myodbc. Funny, at the time, nobody else seemed to understand what I was talking about. Once I got phpMyAdmin working, the problem became academic, but it never did get solved. I'm still trying to find a solution to my $FORMATQUERY ORDER BY problem with a logic function on two values. Baring a solution, I can only hope for a workaround before a year of effort is not wasted, because someone else beat me to market. Please, this does not need to be a volunteer effort. If anyone thinks they can solve this, contact me directly and we can work something out. On 24 Jan 2001, at 6:34, Bob Hall wrote: One of our users is getting the message "another user has changed this database..etc save changes to clipboard or drop changes... etc", when he tries to update certain fields in the table. The table has a timestamp and a primary key. In fact, this user can change certain fileds without difficulty for certain types of data and not for others (i.e. Access accepts changes when the data is a document but not when its a collection). To make things more confusing., other users can change all fields in the same table via Access without receiving the error message. Any one else had and solved this problem? Susan Albright Ma'am, this is an ODBC problem, not a MySQL problem. I assume that the table is a linked table in Access. How is it accessed? Directly, through a query, or through a form? Are there any joins? Does the problem occur only through a query or form that joins the table with another table? What do you mean by 'the data is a document' and 'its a collection'? These aren't MySQL or Jet datatypes. What is the user who's having problems doing that the other users aren't doing? Things that people have done to solve this include dropping and adding primary keys and timestamp fields, setting up relationships between tables as much as possible (you can set up a relationship between linked tables, but I don't think you can specify what the relationship is), and selecting UniqueRecords in queries (DISTINCTROW in SQL). Bob Hall Know thyself? Absurd direction! Bubbles bear no introspection. -Khushhal Khan Khatak - 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 John Jensen 520 Goshawk Court Bakersfield, CA 93309 - 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
Database reading problems
After noticing all my PHP scripts using MySQL had stopped working, I noticed that any attempt to look through databases mith mysql brought up; Can't read dir of '.' (Errcode: 9) Can't read dir of './mysql' (Errcode: 9) Database changed I can no longer get any information from MySQL, and I'm hoping this is something I did and don't remember, rather than some other horrible, less reversable thing. I checked directory permissions and all that, but everything is as usual. Any help would be appreciated Thanks, Chris - 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: Problems with RPM installation
You might be able to build it from tarball as a regular user but access to the RPM database (e.g. installing via RPM) requires root level permissions. On Wed, 24 Jan 2001, lkeeton spewed into the bitstream: lWhy am I getting this error. Is the rpm program not working. I am running as luser admin not root. I was told that I can still install mysql without using lthe root user. The only thing i know is that when I went to that directory lbelow I don't have permission to write to that directory. I am not a expert in lnetwork administration. I just want some reasoning behind this error. l l l l lfailed to open //var/lib/rpm/packages.rpm l lerror: cannot open //var/lib/rpm/packages.rpm -- Chuck Mead, Owner, MoonGroup.com [EMAIL PROTECTED] GnuPG Public Key Available: http://wwwkeys.us.pgp.net - 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
Query problem in mysql.3.23.32
I have a problem in 3.23.32, The query select * from table repalce table values('','nextval+1) returns me always nextval=1. table has 1 row and the query runs fine in mysql 3.22.x Any idea? Thanks.
MySQL-3.22.32 host.ISM not found. Plz HELP
Hi everybody, I'm trying to install MySQL-3.22.32 on a RH 7.0 everything looks normal but the server dies sending this message mysqld: Can't find file: 'host.ISM' (errno: 2) How do I fix this?, Where can I get this file? or How can I build it? Thanks __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.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
sql problem - it may be a version problem ??
hi everybody !!! i need to resolve the following query ( a silly one ) in a mysql server 3.22.30 and i get the following error: mysql select count(distinct ip_dst) from iphdr; ERROR 1064: You have an error in your SQL syntax near 'distinct ip_dst) from iphdr' at line 1 mysql i looked up in the manual ( i downloaded it from the web ) and the syntax is correct !!! ( here is the example in the manual COUNT(DISTINCT expr,[expr...]) Returns a count of the number of different values. mysql select COUNT(DISTINCT results) from student; ) please help thanks in advance !!! laura. - 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: AW: replication in 3.23.32
On Wednesday 24 January 2001 09:47, Josef Chladek wrote: I am currently investigating this. In the mean time, see if the following workaround will solve the problem: CHANGE MASTER TO MASTER_HOST='your-master',MASTER_USER='user',MASTER_PASSWORD='mast er-pass', MASTER_LOG_POS=position_from_master_info,MASTER_LOG_FILE='log_file _from_master_info'; SLAVE START; will give that a try, downgraded to 3.23.31 - this works... thanks will report josef Found the problem. First, the patch: = slave.cc 1.82 vs 1.83 = --- 1.82/sql/slave.cc Wed Jan 24 09:15:34 2001 +++ 1.83/sql/slave.cc Wed Jan 24 12:47:09 2001 @@ -509,14 +509,14 @@ return 1; } -if (!(length=my_b_gets(mi-file, mi-log_file_name, - sizeof(mi-log_file_name +if ((length=my_b_gets(mi-file, mi-log_file_name, + sizeof(mi-log_file_name))) 1) { msg="Error reading log file name from master info file "; goto error; } -mi-log_file_name[length]= 0; // kill \n +mi-log_file_name[length-1]= 0; // kill \n char buf[FN_REFLEN]; if(!my_b_gets(mi-file, buf, sizeof(buf))) { Monty was cleaning up my code and accidentally introduced the bug, but unfortunately, at that time we did not have a test case for starting the slave with existing master.info without reset or change master to, so the bug slipped by. Now I have added a test case for this ( rpl17), so if somebody decides to "clean up" that code again, we can catch this. The bug only happens when you restart the server - SLAVE STOP/SLAVE START will work ok. If you do not want to patch, downgrade or wait for 3.23.33, the workaround to restart a slave is: * cat /path/to/datadir/master.info * get the log name and the offset * start the slave server * CHANGE MASTER TO MASTER_LOG_POS=saved_position, MASTER_LOG_FILE='saved_log_name' -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sasha Pachev [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Provo, Utah, USA ___/ - 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: sql problem - it may be a version problem ??
That feature is only available in 3.23, while you're running 3.22. Upgrade your server and you'll get it. -- "There cannot be a crisis today. My schedule is already full." --Henry Kissinger -Original Message- From: lrado [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 13:51 Cc: MySQL List Subject: sql problem - it may be a version problem ?? hi everybody !!! i need to resolve the following query ( a silly one ) in a mysql server 3.22.30 and i get the following error: mysql select count(distinct ip_dst) from iphdr; ERROR 1064: You have an error in your SQL syntax near 'distinct ip_dst) from iphdr' at line 1 mysql i looked up in the manual ( i downloaded it from the web ) and the syntax is correct !!! ( here is the example in the manual COUNT(DISTINCT expr,[expr...]) Returns a count of the number of different values. mysql select COUNT(DISTINCT results) from student; ) please help thanks in advance !!! laura. - 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-3.22.32 host.ISM not found. Plz HELP
It's one of MySQL's permission files which is usually in /var/lib/mysql/mysql If the file is there it may be permissioned incorrectly. It usually needs to be owned by the mysql user and group so cd /var/lib/mysql chown mysql.mysql mysql -R if this seems to be the problem. The permission files in this dir are included with the installation and I think there's a script to set them up initially so check the docs for that cause I can't remember what it's called for the moment. Mark. -Original Message- From: Manuel Leos [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 7:43 PM To: MySQL Subject: MySQL-3.22.32 host.ISM not found. Plz HELP Hi everybody, I'm trying to install MySQL-3.22.32 on a RH 7.0 everything looks normal but the server dies sending this message mysqld: Can't find file: 'host.ISM' (errno: 2) How do I fix this?, Where can I get this file? or How can I build it? Thanks __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.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 - 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: Query problem in mysql.3.23.32
On 24-Jan-01 Jesús Gómez Pastor wrote: I have a problem in 3.23.32, The query select * from table repalce table values('','nextval+1) ^^ ^ these might be a problem, in addition to your select/replace/(update) confusion. returns me always nextval=1. no, it return a syntax error. table has 1 row and the query runs fine in mysql 3.22.x I doubt it. How about a cut paste of the table definition, and a short description of what you think you are trying to do ? Regards, -- Don Read [EMAIL PROTECTED] -- If you are going to sin, sin against God, not the bureaucracy. God will forgive you but the bureaucrats won'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: Sizing HEAP table using .MYD/MYI
Richard Thanks for the info! I have just one more question. To get the structure of the table I did a myisamchk and did a desc on the table. The output is shown below. From this is it possible to determine the amount of RAM I would need for a HEAP table? Thanks! MichaelT MyISAM file: domain0115 Record format: Packed Character set: latin1 (8) File-version:1 Creation time: 2001-01-18 21:38:07 Status: open,changed Data records: 21400798 Deleted blocks: 0 Datafile parts: 34023680 Deleted data: 0 Datafile pointer (bytes):4 Keyfile pointer (bytes):4 Datafile length: 712991472 Keyfile length: 224704512 Max datafile length:4294967294 Max keyfile length: 4398046510079 Recordlength: 65 table description: Key Start Len Index Type Rec/key Root Blocksize 1 2 60 unique char packed stripped 1 35837952 1024 mysql desc domain0115; +-+-+--+-+-+---+ --+ | Field | Type| Null | Key | Default | Extra | Privileges | +-+-+--+-+-+---+ --+ | dname | varchar(60) | | PRI | | | select,insert,update | | matched | int(11) | YES | | NULL| | select,insert,update | +-+-+--+-+-+---+ --+ 2 rows in set (0.04 sec) ** Hi all I have a large table (20 million records) that I want to load into RAM to improve selects. I understand (from previous posts) that I must create a HEAP table. Please correct me if I'm wrong on this. My question is - how much RAM do I need if the MYI and MYD files are as follows :- 214M Jan 20 19:11 domain0115.MYI 680M Jan 20 19:11 domain0115.MYD Those sizes are in Mega bytes. Does the RAM size have to provide for both the MYI and MYD files? Yes. You will need around 1gig available mem to load that table! You have not included the structure of the table, so the table could have fixed row lengths. This can make a table very large indeed. Are you using varchar or char columns? Also, is it correct that the MYD is the datafile and MYI the index file? Yes. -- Richard Ellerbrock [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
Doing multiple updates
Hello, I am creating a mock site that has a money balance that people can login and pretend to pay money for stuff online via my site. I am using php with mysql to implement this. How do I make sure that a balance for a particular account is (locked) so only 1 spend for that account can happen at one time? for example my php script grabs the balance from the payer account and receiver account. How do I make sure that the balance is locked so the balance is read before the updated transaction occurs causing the person to spend money that he/she doesn't have. I hope I have provided enough explanation for you guys to point me in the right direction. thanks randy - 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 3.23.32 table problems
Hello monty, I'm using mysql 3.23.32 on linux and it looks like there is a problem with check/auto-recovery left: On many of my servers I find the above in a log file: 24.Jan 23:45:07 : pid:1412 counter:32256 AllInOne MySqlEr Query - #1034 [tor.local] - Incorrect key file for table: 'g09stat_sitepaths'. Try to repair it delete from layers_st37.g09stat_sitepaths where layer_id=14704 24.Jan 23:45:07 : pid:1412 h -- 32256/0 AllInOne rec:290 l:0 tm:4.03 24.Jan 23:45:07 : pid:1412 h 32256/0 [24.1 1:42] - [] q:0.23 i:0.00 a:3.32 Then I look to the .err log file I se there : tor:/spylog/layers # tail -1 /spylog/db/tor.err | grep g09stat_sitepaths 010124 2:13:46 Warning: Checking table: './layers_st26/g09stat_sitepaths' 010124 2:17:10 Warning: Checking table: './layers_st38/g09stat_sitepaths' 010124 3:10:08 Warning: Checking table: './layers_st37/g09stat_sitepaths' 010124 9:17:48 Warning: Checking table: './layers_st49/g09stat_sitepaths' So the table was checked and was found OK. Then I do check table now: mysql check table layers_st37.g09stat_sitepaths; +---+---+--++ | Table | Op| Msg_type | Msg_text | +---+---+--++ | g09stat_sitepaths | check | warning | Table is marked as crashed | | layers_st37.g09stat_sitepaths | check | status | OK | +---+---+--++ 2 rows in set (9.11 sec) So it is still marked crashed were it's really OK and even more it was checked and found correct before. -- Best regards, Peter mailto:[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: Junction entities VS. JOIN
Benjamin, beautifully put. Thank you both so much. --Dylan Shea Benjamin Pflugmann wrote: Hi. It's simply that you can look at (a_id,b_id) as a PRIMARY KEY. You don't need an additional, aritificial sequence number ab_id. CREATE TABLE table_ab ( a_id INT NOT NULL, b_id INT NOT NULL, PRIMARY KEY (a_id,b_id), UNIQUE (b_id,a_id) ) Replace INT by whatever type seems appropriate (but probably INT is okay). The primary key (which implicitly is a UNIQUE KEY), already speeds up searches by a_id. The second index is there to speed up searches by b_id. You could replace it with INDEX(b_id), which would be enough, but my proposal has the advantage that it is a bit faster in exchange for a bit more disk space needed. Bye, Benjamin. On Wed, Jan 24, 2001 at 06:43:27AM -0500, [EMAIL PROTECTED] wrote: Thanks. (I don't know where I was coming from with the JOIN stuff, should have gone to bed hours ago) However, you don't think I should have the "ab_id" column, which would be the standard serial primary key for a table. Does a junction entity table not need it's own record ids? Technically, it shouldn't, but does good db form require it? or is a junction entity normalization table exempt from that? thanks again --Dylan Shea "Carsten H. Pedersen" wrote: I'm afraid this borders on sql/db question material vs. specific mysql material, but it stems from what I've read in the O'Reilly mysql book. If I have a db, which has two tables that have about 15 fields each. cut and they have a many to many relationship between them. Should I a. Create a normalized junction entity.? Yes. table_ab ab_id a_id b_id [...] - 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: Doing multiple updates
Sounds like you want a mutex and you can use get_lock and release_lock in mysql for that. http://www.mysql.com/doc/M/i/Miscellaneous_functions.html GET_LOCK(str,timeout) Tries to obtain a lock with a name given by the string str, with a timeout of timeout seconds. Returns 1 if the lock was obtained successfully, 0 if the attempt timed out, or NULL if an error occurred (such as running out of memory or the thread was killed with mysqladmin kill). A lock is released when you execute RELEASE_LOCK(), execute a new GET_LOCK(), or the thread terminates. This function can be used to implement application locks or to simulate record locks. It blocks requests by other clients for locks with the same name; clients that agree on a given lock string name can use the string to perform cooperative advisory locking: mysql select GET_LOCK("lock1",10); - 1 mysql select GET_LOCK("lock2",10); - 1 mysql select RELEASE_LOCK("lock2"); - 1 mysql select RELEASE_LOCK("lock1"); - NULL Note that the second RELEASE_LOCK() call returns NULL because the lock "lock1" was automatically released by the second GET_LOCK() call. RELEASE_LOCK(str) Releases the lock named by the string str that was obtained with GET_LOCK(). Returns 1 if the lock was released, 0 if the lock wasn't locked by this thread (in which case the lock is not released), and NULL if the named lock didn't exist. The lock will not exist if it was never obtained by a call to GET_LOCK() or if it already has been released. Mark. -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 8:48 PM To: [EMAIL PROTECTED] Subject: Doing multiple updates Hello, I am creating a mock site that has a money balance that people can login and pretend to pay money for stuff online via my site. I am using php with mysql to implement this. How do I make sure that a balance for a particular account is (locked) so only 1 spend for that account can happen at one time? for example my php script grabs the balance from the payer account and receiver account. How do I make sure that the balance is locked so the balance is read before the updated transaction occurs causing the person to spend money that he/she doesn't have. I hope I have provided enough explanation for you guys to point me in the right direction. thanks randy - 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: Doing multiple updates
Randy, My recommendation (and there are probably many people who will disagree with me) is to use a "soft-lock" schema. In your account table, add a field named lockedBy. I usually add a field named lockedAt also as a timestamp. the basic flow is this: 1: Check to see if the record has something in lockedBy -NO- 2: Update the record with your userID 3: Check to see if there record has something in lockedBy and it is you. -YES- 4: you have successfully soft-locked the record for update. Go ahead and make your update 5: update the record to remove the lock. WARNING: This system assumes that you have control over all processes that access the database. If there is a chance that someone will come in and be able to modify the data outside of your code then they can bypass your checks and modify the data. In many DBMSs (not sure yet about MySQL) record locks keep people for even seeing the data and some (M$ SQL) used to lock whole tables to do a single update. (sux big time) HTH, Cal http://www.calevans.com -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 2:48 PM To: [EMAIL PROTECTED] Subject: Doing multiple updates Hello, I am creating a mock site that has a money balance that people can login and pretend to pay money for stuff online via my site. I am using php with mysql to implement this. How do I make sure that a balance for a particular account is (locked) so only 1 spend for that account can happen at one time? for example my php script grabs the balance from the payer account and receiver account. How do I make sure that the balance is locked so the balance is read before the updated transaction occurs causing the person to spend money that he/she doesn't have. I hope I have provided enough explanation for you guys to point me in the right direction. thanks randy - 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: Doing multiple updates
Sounds good. You should probably have a cleaner process of some kind just in case one of your threads dies before it can release the lock. I think with get_lock you have a timeout that protects you from that. I'm curious about the internals of get_lock - perhaps it's more efficient to use a soft lock like you've described. I dunno. -Original Message- From: Cal Evans [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 9:10 PM To: Randy Johnson; [EMAIL PROTECTED] Subject: RE: Doing multiple updates Randy, My recommendation (and there are probably many people who will disagree with me) is to use a "soft-lock" schema. In your account table, add a field named lockedBy. I usually add a field named lockedAt also as a timestamp. the basic flow is this: 1: Check to see if the record has something in lockedBy -NO- 2: Update the record with your userID 3: Check to see if there record has something in lockedBy and it is you. -YES- 4: you have successfully soft-locked the record for update. Go ahead and make your update 5: update the record to remove the lock. WARNING: This system assumes that you have control over all processes that access the database. If there is a chance that someone will come in and be able to modify the data outside of your code then they can bypass your checks and modify the data. In many DBMSs (not sure yet about MySQL) record locks keep people for even seeing the data and some (M$ SQL) used to lock whole tables to do a single update. (sux big time) HTH, Cal http://www.calevans.com -Original Message- From: Randy Johnson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 24, 2001 2:48 PM To: [EMAIL PROTECTED] Subject: Doing multiple updates Hello, I am creating a mock site that has a money balance that people can login and pretend to pay money for stuff online via my site. I am using php with mysql to implement this. How do I make sure that a balance for a particular account is (locked) so only 1 spend for that account can happen at one time? for example my php script grabs the balance from the payer account and receiver account. How do I make sure that the balance is locked so the balance is read before the updated transaction occurs causing the person to spend money that he/she doesn't have. I hope I have provided enough explanation for you guys to point me in the right direction. thanks randy - 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
rank newbie looking for SQL forum
Hi-- As stated above, I'm a raw beginner looking for some (probably fairly simple) SQL conceptual help. Having lurked for a while, I can see that since this isn't MySQL-specific, there's probably a better forum in which I can attempt to iron out my confusion. Can anyone point me to a mailing list/usenet group where I can ask lots of dumb newbie SQL questions w/o making a major pest of myself? I'll be back here in a short while, when I try to bang my head against a Red Hat MySQL install again. 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
Re: rank newbie looking for SQL forum
start with: http://www.sqlcourse.com/ At 01:44 PM 1/24/2001 -0800, Jason Witherspoon wrote: Hi-- As stated above, I'm a raw beginner looking for some (probably fairly simple) SQL conceptual help. Having lurked for a while, I can see that since this isn't MySQL-specific, there's probably a better forum in which I can attempt to iron out my confusion. Can anyone point me to a mailing list/usenet group where I can ask lots of dumb newbie SQL questions w/o making a major pest of myself? I'll be back here in a short while, when I try to bang my head against a Red Hat MySQL install again. - Scott Baker - Webster Internet - Network Technician 503.266.8253 - [EMAIL PROTECTED] "Children today are tyrants. They contradict their parents, gobble their food, and tyrannize their teachers." - Socrates - 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: rank newbie looking for SQL forum
Hi Jason, You have found the right place. No one here minds you asking simple questions, so long as you have checked the manual and the list archive before asking. In particular, Red Hat installs are a frequent topic. This list is supposed to be MySQL specific, but sometimes we get a little side-tracked. Welcome to the MySQL Community - I hope you have as much success with it as we have. Quentin Bennett Infinity Solutions http://www.infinity.co.nz -Original Message- From: Jason Witherspoon [mailto:[EMAIL PROTECTED]] Sent: Thursday, 25 January 2001 10:44 To: [EMAIL PROTECTED] Subject: rank newbie looking for SQL forum Hi-- As stated above, I'm a raw beginner looking for some (probably fairly simple) SQL conceptual help. Having lurked for a while, I can see that since this isn't MySQL-specific, there's probably a better forum in which I can attempt to iron out my confusion. Can anyone point me to a mailing list/usenet group where I can ask lots of dumb newbie SQL questions w/o making a major pest of myself? I'll be back here in a short while, when I try to bang my head against a Red Hat MySQL install again. 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 The information contained in this email is privileged and confidential and intended for the addressee only. If you are not the intended recipient, you are asked to respect that confidentiality and not disclose, copy or make use of its contents. If received in error you are asked to destroy this email and contact the sender immediately. Your assistance is appreciated. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: rank newbie looking for SQL forum
I haven't participated, but the site at www.sqlteam.com looks useful and does have a number of forums there. HTH, G. -Original Message- From: Jason Witherspoon [mailto:[EMAIL PROTECTED]] Sent: Thursday, 25 January 2001 8:14 To: [EMAIL PROTECTED] Subject: rank newbie looking for SQL forum Hi-- As stated above, I'm a raw beginner looking for some (probably fairly simple) SQL conceptual help. Having lurked for a while, I can see that since this isn't MySQL-specific, there's probably a better forum in which I can attempt to iron out my confusion. Can anyone point me to a mailing list/usenet group where I can ask lots of dumb newbie SQL questions w/o making a major pest of myself? I'll be back here in a short while, when I try to bang my head against a Red Hat MySQL install again. 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 - 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: Sizing HEAP table using .MYD/MYI
Hi, If my calculations are correct, your table will grow quite a lot if you change from the MyISAM format to HEAP. The space to hold the data will be roughly 1.3GB (a double of what it's with MyISAM!) and the index will be another 1.3GB. Pretty huge, isn't it? I think the dynamic row format is appropriate for your table. BTW, running OPTIMIZE on your table could speed things up, the figures you post indicate that the table is heavily fragmented. Also, an ANALYZE never hurts. Perhaps you could try to move it to a RAM disk (in MyISAM format), that shouldn't eat up that much space as the HEAP format. If you can live with a read-only access to the table, at least for some time, you should consider using the myisampack utility to compress the datafile. Then it's actually very fast to have the table on disk, too, because with enough RAM, the keyfile is buffered in MySQL key cache and the data is mmap()'ed to memory. This should be as fast as a RAM disk. If you only need to update a small portion of the table, you could consider using the MERGE virtual driver, with the basic part myisampack'ed and the changeable part in plain MyISAM. But that might slow things down a bit. You could also reconsider the table design. Is it really so that the varchar(60) field is the primary key? Are there any other tables that refer to this one with a foreign key? (The foreign key should then be also a varchar(60), which would probably be a killer.) Jan mike thomas wrote: Richard Thanks for the info! I have just one more question. To get the structure of the table I did a myisamchk and did a desc on the table. The output is shown below. From this is it possible to determine the amount of RAM I would need for a HEAP table? Thanks! MichaelT MyISAM file: domain0115 Record format: Packed Character set: latin1 (8) File-version:1 Creation time: 2001-01-18 21:38:07 Status: open,changed Data records: 21400798 Deleted blocks: 0 Datafile parts: 34023680 Deleted data: 0 Datafile pointer (bytes):4 Keyfile pointer (bytes):4 Datafile length: 712991472 Keyfile length: 224704512 Max datafile length:4294967294 Max keyfile length: 4398046510079 Recordlength: 65 table description: Key Start Len Index Type Rec/key Root Blocksize 1 2 60 unique char packed stripped 1 35837952 1024 mysql desc domain0115; +-+-+--+-+-+---+ | Field | Type| Null | Key | Default | Extra | Privileges +-+-+--+-+-+---+ | dname | varchar(60) | | PRI | | | | matched | int(11) | YES | | NULL| | +-+-+--+-+-+---+ 2 rows in set (0.04 sec) ** Hi all I have a large table (20 million records) that I want to load into RAM to improve selects. I understand (from previous posts) that I must create a HEAP table. Please correct me if I'm wrong on this. My question is - how much RAM do I need if the MYI and MYD files are as follows :- 214M Jan 20 19:11 domain0115.MYI 680M Jan 20 19:11 domain0115.MYD Those sizes are in Mega bytes. Does the RAM size have to provide for both the MYI and MYD files? Yes. You will need around 1gig available mem to load that table! You have not included the structure of the table, so the table could have fixed row lengths. This can make a table very large indeed. Are you using varchar or char columns? Also, is it correct that the MYD is the datafile and MYI the index file? Yes. -- Richard Ellerbrock [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: Field_float::val_str crash in 3.23.32
On Wed, Jan 24, 2001 at 03:15:48PM -0600, Kevin Day wrote: Does this only occur when more than one client is accessing the table in question? If so, it's a thread-related problem that has been with us since FreeBSD 3.x. :-( It looks like what I've seen before. I have a re-produceable case that I sent to one of the MySQL developers and he was able to see the problem. Tracing it down, however, requires someone who knows a lot about FreeBSD threading. I've found some FreeBSD gurus here who might be able to help. I just need a MySQL developer to point them at... Description: I'm getting a pretty consistant crash in mysqld: /usr/ports/databases/mysql323-server/work/mysql-3.23.32/sql/mysqld: ready for connections Program received signal SIGSEGV, Segmentation fault. 0x282ae35c in bcopy () from /usr/lib/libc_r.so.4 (gdb) bt #0 0x282ae35c in bcopy () from /usr/lib/libc_r.so.4 #1 0x282c00a8 in _thread_autoinit_dummy_decl () from /usr/lib/libc_r.so.4 #2 0x282afcca in __dtoa () from /usr/lib/libc_r.so.4 #3 0x282adb3b in vfprintf () from /usr/lib/libc_r.so.4 #4 0x282abc56 in vfprintf () from /usr/lib/libc_r.so.4 #5 0x2829d4cd in sprintf () from /usr/lib/libc_r.so.4 #6 0x80633e0 in Field_float::val_str (this=0x9175410, val_buffer=0xbf7f046c, val_ptr=0xbf7f046c) at field.cc:1847 #7 0x8061921 in Field::send (this=0x9175410, packet=0x8adcc20) at field.cc:257 #8 0x8132c59 in Item_field::send (this=0x8e4ea70, str_arg=0x8adcc20) at item.h:119 #9 0x806ac67 in select_send::send_data (this=0x8e4e6a8, items=@0x8adca4c) at sql_class.cc:236 #10 0x809a36d in end_send (join=0xbf7f0778, join_tab=0x8b72868, end_of_records=false) at sql_select.cc:4521 #11 0x80998d6 in sub_select (join=0xbf7f0778, join_tab=0x8b72750, end_of_records=false) at sql_select.cc:4033 #12 0x8099567 in do_select (join=0xbf7f0778, fields=0x8adca4c, table=0x0, procedure=0x0) at sql_select.cc:3925 #13 0x8091957 in mysql_select (thd=0x8adc800, tables=0x8e4e0d8, fields=@0x8adca4c, conds=0x8e4e5c8, ftfuncs=@0x8adca80, order=0x8e4e688, group=0x0, having=0x0, proc_param=0x0, select_options=8950784, result=0x8e4e6a8) at sql_select.cc:755 #14 0x8079299 in mysql_execute_command () at sql_parse.cc:957 #15 0x807c29e in mysql_parse (thd=0x8adc800, inBuf=0x8e4e010 "SELECT * FROM cp WHERE C11=1 C12=1.0 C13=1.0 PL1 0 ORDER BY C4 DESC", length=80) at sql_parse.cc:2085 #16 0x8078458 in do_command (thd=0x8adc800) at sql_parse.cc:668 #17 0x8077800 in handle_one_connection (arg=0x8adc800) at sql_parse.cc:403 #18 0x282419a7 in _thread_start () from /usr/lib/libc_r.so.4 #19 0xbee93ffc in ?? () #20 0x80738db in create_new_thread (thd=0x8e27780) at mysqld.cc:2056 #21 0x81c2c00 in ?? () Error accessing memory address 0x2: Bad address. (gdb) up #1 0x282c00a8 in _thread_autoinit_dummy_decl () from /usr/lib/libc_r.so.4 (gdb) up #2 0x282afcca in __dtoa () from /usr/lib/libc_r.so.4 (gdb) up #3 0x282adb3b in vfprintf () from /usr/lib/libc_r.so.4 (gdb) up #4 0x282abc56 in vfprintf () from /usr/lib/libc_r.so.4 (gdb) up #5 0x2829d4cd in sprintf () from /usr/lib/libc_r.so.4 (gdb) up #6 0x80633e0 in Field_float::val_str (this=0x9175410, val_buffer=0xbf7f046c, val_ptr=0xbf7f046c) at field.cc:1847 warning: Source file is more recent than executable. 1847sprintf(to,"%.*f",dec,nr); (gdb) print dec $1 = 2 '\002' (gdb) print nr $2 = 999204736 (gdb) print to $3 = 0xbf7f047c "1" This bug was not present in 3.22.32, and only became evident when we skipped to 3.23. How-To-Repeat: Right now, using the "adcycle" package hits it within 10-15 minutes of use on a heavily loaded site. Fix: Submitter-Id: submitter ID Originator:Kevin Day Organization: stileproject.com MySQL support: none Synopsis: Crash in mysqld Field_float::val_str in 3.23.32 Severity: critical Priority: medium Category: mysql Class: sw-bug Release: mysql-3.23.32 (Source distribution) Environment: machine, os, target, libraries (multiple lines) System: FreeBSD server4.stileproject.com 4.2-RELEASE FreeBSD 4.2-RELEASE #0: Fri Sep 29 22:40:46 CDT 2000 [EMAIL PROTECTED] Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc GCC: Using builtin specs. gcc version 2.95.2 19991024 (release) Compilation info: CC='gcc' CFLAGS='' CXX='gcc' CXXFLAGS='' LDFLAGS='' LIBC: -r--r--r-- 1 root wheel 1169076 Nov 20 05:59 /usr/lib/libc.a lrwxrwxrwx 1 root wheel 9 Sep 26 19:13 /usr/lib/libc.so - libc.so.4 -r--r--r-- 1 root wheel 559196 Nov 20 05:59 /usr/lib/libc.so.4 Configure command: ./configure --with-unix-socket-path=/var/tmp/mysql.sock --with-low-memory --with-mit-threads=yes --without-perl Perl: This is perl, version 5.005_03 built for i386-freebsd Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 328-7878Fax: (408) 530-5454 Cell: (408) 439-9951
Re: Field_float::val_str crash in 3.23.32
On Wed, Jan 24, 2001 at 05:09:59PM -0600, Kevin Day wrote: I don't know why configure doesn't think I have snprintf, but I guess I'm glad it doesn't, because shouldn't that cause bad things if I did? shouldn't the line be: snprintf(to,val_buffer-length(),"%.*f",dec,nr); In any case, I'm definately crashing on 1847, not 1845, so this isn't my problem anyway Does that actually solve the problem? -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 328-7878Fax: (408) 530-5454 Cell: (408) 439-9951 - 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: Adding UDF functions
On Wed, Jan 24, 2001 at 05:20:30PM -0500, Kent Hoover wrote: Can I add, activate, and use a new UDF function to an already existing udf_.so library without restarting MySQL server? Yes. -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 328-7878Fax: (408) 530-5454 Cell: (408) 439-9951 - 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: Running mysql tests
DBI is the database interface for Perl, I assume this bench mark uses perl so you will need to install the DBI. - Original Message - From: "MacDonell, Dennis" [EMAIL PROTECTED] To: "'MySQL List'" [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 5:51 PM Subject: Running mysql tests Hi, There must be a simple answer to this but I'm not quite across it. I build mysql-3.23.32 yesterday, and seeing if everything worked. Going through the steps of INSTALL-SOURCE, everything seemed to be working until I got to the bit where you run all the tests. From the command line in /usr/local/mysql/sql-bench I typed ./run-all-tests I got the following message Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00502/alpha-dec_osf /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/alpha-dec_osf /usr/local/lib/perl5/site_perl/5.005 .) at ./run-all-tests line 36. BEGIN failed--compilation aborted at ./run-all-tests line 36. What is DBI, sounds like data base interface or something like that. Do I need a latter perl or a different configure for my perl??? Dennis ## Dennis Macdonell Systems Administrator AUSLIG mail: PO Box 2, Belconnen, ACT 2617 email: [EMAIL PROTECTED] ph: 61 2 6201 4326 fax: 61 2 6201 4377 ## - 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 - 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: Running mysql tests
Hi, you need to install the perl DBI package! What is DBI, sounds like data base interface or something like that. Do I need a latter perl or a different configure for my perl??? "The DBI is a database interface module for Perl. It defines a set of methods, variables and conventions that provide a consistent database interface independent of the actual database being used." --Tim Bunce visit the following url to get more information on DBI including downloads and all kinds of FAQ's. http://www.symbolstone.org/technology/perl/DBI/ Regards Jorge MySQL Development Team __ ___ __ __ / |/ /_ __/ __/ __ \/ / Jorge del Conde [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\/ Mexico City, Mexico ___/ - Original Message - From: "MacDonell, Dennis" [EMAIL PROTECTED] To: "'MySQL List'" [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 6:51 PM Subject: Running mysql tests Hi, There must be a simple answer to this but I'm not quite across it. I build mysql-3.23.32 yesterday, and seeing if everything worked. Going through the steps of INSTALL-SOURCE, everything seemed to be working until I got to the bit where you run all the tests. From the command line in /usr/local/mysql/sql-bench I typed ./run-all-tests I got the following message Can't locate DBI.pm in @INC (@INC contains: /usr/local/lib/perl5/5.00502/alpha-dec_osf /usr/local/lib/perl5/5.00502 /usr/local/lib/perl5/site_perl/5.005/alpha-dec_osf /usr/local/lib/perl5/site_perl/5.005 .) at ./run-all-tests line 36. BEGIN failed--compilation aborted at ./run-all-tests line 36. What is DBI, sounds like data base interface or something like that. Do I need a latter perl or a different configure for my perl??? Dennis ## Dennis Macdonell Systems Administrator AUSLIG mail: PO Box 2, Belconnen, ACT 2617 email: [EMAIL PROTECTED] ph: 61 2 6201 4326 fax: 61 2 6201 4377 ## - 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 - 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: SELECT FROM TABLE WHERE ?
Did you ever get an answer? I played with some queries and came up with this: SELECT ID, NAME, RATING FROM SINGLEMALTS ORDER BY RATING DESC LIMIT 0,1; If you want more than one record, you can change the 1 at the end to how many you want. If you want to list them all in that order, you can take off the LIMIT 0,1 part. Hope this helps -Angela Richard Reina wrote: I've tried the manual (and the Oreily MySQL book) and played around with MAX() and GREATEST() but could not figure it out. |ID |NAME |RATING | |213|McCallen 12| 9 | |214|Glenmorangie | 8 | |225|Glenlevit | 7 | How do I select the one with highest rating without knowing what the highest rating is. SELECT ID, NAME, RATING FROM SINGLEMALTS WHERE RATING - 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
mysql.sock doesn't exist
Today I had an unsuccessful intallation of mysql 3.22.32 (RPM) server on a Cobalt Raq 3 Server. I am not quite sure why the file didn't install but the 2202 can't find var/lib/mysql mysql.sock error continues to be an error when starting safe_mysqld server. How can I solve this problem? I went ahead and manually added this sock file but when the server is started it comes and says mysql server starts and the dameon ends and my mysql.sock file that i manually added on the var/lib/mysql directory has now been deleted. I am frusturated why this didn't work. Any help would be great. Brent - 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
odbc_connect();
hello- I'm getting a parse error here...any ideas why? This is my first try at databases, php, mysql and odbc, so. the database is one which i made in MSaccess... thanks- html head title/title /head body bgcolor="#66" link="#CC" vlink="#CC" alink="#CC" text="#00" ?php $odbc_dsn = "mac_test"; $odbc_userid = ""; $odbc_password = ""; $query = "select * from user"; ---PARSE ERROR ON NEXT LINE - if(!(odbc_db = odbc_connect($odbc_dsn, $odbc_userid, $odbc_password))) ---PARSE ERROR ON LINE ABOVE-- die("Couldnt connect to $odbc_dsn"); if(!($odbc_rs = odbc_do($odbc_db, $query))) die("Error executing query $query"); $num_cols = odbc_num_fields($odbc_rs); if($num_cols 1) die("Query returned an empty set"); for($a = 1; $a =$num_cols; $a++) { echo odbc_field_name($odbc_rs, $a); ? /body /html
Re: odbc_connect();
Hi, as far as I can see that, you forgot the $ sign in front of the odbc_db variable at the line, that causes the error. bye, Thiemo Mac Martine schrieb: hello- I'm getting a parse error here...any ideas why? This is my first try at databases, php, mysql and odbc, so. the database is one which i made in MSaccess... thanks- html head title/title /head body bgcolor="#66" link="#CC" vlink="#CC" alink="#CC" text="#00" ?php $odbc_dsn = "mac_test"; $odbc_userid = ""; $odbc_password = ""; $query = "select * from user"; ---PARSE ERROR ON NEXT LINE - if(!(odbc_db = odbc_connect($odbc_dsn, $odbc_userid, $odbc_password))) ---PARSE ERROR ON LINE ABOVE-- die("Couldnt connect to $odbc_dsn"); if(!($odbc_rs = odbc_do($odbc_db, $query))) die("Error executing query $query"); $num_cols = odbc_num_fields($odbc_rs); if($num_cols 1) die("Query returned an empty set"); for($a = 1; $a =$num_cols; $a++) { echo odbc_field_name($odbc_rs, $a); ? /body /html -- == http://www.submitta.com Promote your website! Free download of cutting edge high per- formance multiple URL submission program. 600+ search engines. - 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
Replication question
I have a couple of questions regarding replication in MySQL: 1) does it work well/handle loss of connections due to network outages/delays; we have a geographically diverse environment, and were hoping to be able to replicate the data across the connections (which may have outages from time to time) 2) Is it possible to set the hosts up in the following manner, where Host [1,2,3] all recieve data updates that should go to all other hosts Host[A,B] recieves updates from Host 1, and updates some tables only to Host 1(client data) Host A \ Host 1 --- Host 2 --- Host 3 / Host B Host 2 is in the network between Host 1 and Host 3 I know it is possible to set up replication in a circular mode, but I haven't heard/read of any way to configure them in a chain or star configuration (Host 2 would be a slave to Host 1 and Host 3) and Host 1 would be a slave to A,B and 2 Also, each of these hosts is in a different geographic location, so it would be nice to have some redundancy and load balancing at some sites (Host 1.1, 1.2, 1.3, etc) based on query load. Scott V - 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: Troubles installing MySQL-3.22.32
At 09:58 PM 1/23/01 , Manuel Leos wrote: Hi everybody, I'm trying to install the RPM on a RH 7.0 everything looks normal but the server dies sending this message mysqld: Can't find file: 'host.ISM' (errno: 2) It's part of the first database/table that MySQL sets up for you. I get this error sometimes if my permissions are set wrong. If the data directory is readable, for example. Give that a try. - 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: odbc_connect();
oh, true..thanks! actually its now saying: isnt odbc_connect() a predefined function? Fatal error: Call to unsupported or undefined function odbc_connect() -hmmm... mac - Original Message - From: Thiemo Nagel [EMAIL PROTECTED] To: Mac Martine [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, January 24, 2001 9:45 PM Subject: Re: odbc_connect(); Hi, as far as I can see that, you forgot the $ sign in front of the odbc_db variable at the line, that causes the error. bye, Thiemo Mac Martine schrieb: hello- I'm getting a parse error here...any ideas why? This is my first try at databases, php, mysql and odbc, so. the database is one which i made in MSaccess... thanks- html head title/title /head body bgcolor="#66" link="#CC" vlink="#CC" alink="#CC" text="#00" ?php $odbc_dsn = "mac_test"; $odbc_userid = ""; $odbc_password = ""; $query = "select * from user"; ---PARSE ERROR ON NEXT LINE - if(!(odbc_db = odbc_connect($odbc_dsn, $odbc_userid, $odbc_password))) ---PARSE ERROR ON LINE ABOVE-- die("Couldnt connect to $odbc_dsn"); if(!($odbc_rs = odbc_do($odbc_db, $query))) die("Error executing query $query"); $num_cols = odbc_num_fields($odbc_rs); if($num_cols 1) die("Query returned an empty set"); for($a = 1; $a =$num_cols; $a++) { echo odbc_field_name($odbc_rs, $a); ? /body /html -- == http://www.submitta.com Promote your website! Free download of cutting edge high per- formance multiple URL submission program. 600+ search engines. - 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
Ideas??
Hi, I am creating a web site which allows users to post projects and then others to place bids. I am setting up two tables in MySQL 'Projects' 'Bids' my problem is how best to cross reference. What I was thinking of doing is creating a number of fields in the Projects table... Bid1 Bid2 Bid3 etc and then inserting the BidID from the bids table into Bid1, and if that is already used then it will go into Bid2. But how many Bid# shall I create?? I`m sure there must be a faster method than this, anyone have any suggestions?? TIA Ade - 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: Ideas??
Hi Greg, Thanks for that, perhaps I should drink more coffee help my brain to be a bit more active at 5.30 in the morning. Cheers Ade - 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
How to query???
Can anyone help me with this query??? I have a very big table (70.000 rows) which has several rows like this: idproductdescription 1P1desc1 2P1desc2 and I want to transform it into: idproductdescription 1P1desc1 desc2 I now how to do it in PHP but, is there anyway to do it with a SQL query???