Re: But now new problems :-(
Why not use the binaries from mysql.com? We recommend them over making your own binaries. -- Zak Greant [EMAIL PROTECTED] MySQL AB Community Advocate Personal Blog: http://zak.fooassociates.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: Install issue
On Saturday 08 March 2003 02:33, root wrote: Description: Message indicates to use /usr/bin/mysqladmin to set root password at end of installation, but this is not included in the distribution How-To-Repeat: RedHat 8.0 - rpm --install -p MySQL-3.23.55-1.i386.rpm mysqladmin is a part of client package, not a server. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: Multiple foreign keys?
On Saturday 08 March 2003 02:27, Daevid Vincent wrote: Can I have multiple foreign keys in a table? Like this... I ask because I can't seem to get it to work. Errno: 150. Yes, you can. Check that all tables are InnoDB, that columns have the same type and so on .. CREATE TABLE `dept_table` ( `dept_id` mediumint(8) unsigned NOT NULL auto_increment, `dept_timestamp` timestamp(14) NOT NULL, `dept_company_table_id` mediumint(8) unsigned NOT NULL default '0' REFERENCES company_table(company_id), `dept_rep_table_id` smallint(8) unsigned default NULL REFERENCES rep_table(rep_id), `dept_name` varchar(255) NOT NULL default '', `dept_SCM_10` date NOT NULL default '-00-00', `dept_SCM_20` date NOT NULL default '-00-00', `dept_SCM_40` date NOT NULL default '-00-00', `dept_SCM_60` date NOT NULL default '-00-00', `dept_SCM_80` date NOT NULL default '-00-00', `dept_SCM_90` date NOT NULL default '-00-00', `dept_SCM_100` date NOT NULL default '-00-00', `dept_notes` text NOT NULL, PRIMARY KEY (`dept_id`), KEY `dept_company_table_id` (`dept_company_table_id`), KEY `dept_rep_table_id` (`dept_rep_table_id`), FOREIGN KEY (dept_company_table_id) REFERENCES company_table(company_id) ON DELETE CASCADE, FOREIGN KEY (dept_rep_table_id) REFERENCES rep_table(rep_id) ON DELETE SET NULL ) TYPE=InnoDB; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
re: 'mysqldump' doesn't preserve REFERENCES
On Saturday 08 March 2003 03:06, Daevid Vincent wrote: If I create a table that uses REFERENCES in it, then mysqldump it, the REFERENCES isn't there Notice the `contact_dept_table_id` field in both of the below outputs: CREATE TABLE `contact_table` ( `contact_id` mediumint(8) unsigned NOT NULL auto_increment, `contact_timestamp` timestamp(14) NOT NULL, `contact_dept_table_id` mediumint(8) unsigned NOT NULL default '0' REFERENCES dept_table(dept_id), `contact_fname` varchar(255) NOT NULL default '', `contact_lname` varchar(255) NOT NULL default '', `contact_title` varchar(50) NOT NULL default '', `contact_email` varchar(255) NOT NULL default '', `contact_incept` date NOT NULL default '-00-00', `contact_phone` varchar(20) NOT NULL default '', `contact_address1` varchar(70) NOT NULL default '', `contact_address2` varchar(70) NOT NULL default '', `contact_city` varchar(50) NOT NULL default '', `contact_state` varchar(50) NOT NULL default '', `contact_zip` varchar(50) NOT NULL default '', `contact_country` varchar(50) NOT NULL default '', `contact_notes` longtext NOT NULL, PRIMARY KEY (`contact_id`), KEY `contact_dept_table_id` (`contact_dept_table_id`), KEY `contact_lname` (`contact_lname`), KEY `contact_fname` (`contact_fname`), FOREIGN KEY (contact_dept_table_id) REFERENCES dept_table(dept_id) ON DELETE CASCADE ) TYPE=InnoDB; Then execute: [daevid=pts/1]5:01pm:{/home/daevid} mysqldump -a crm -- MySQL dump 8.22 It's Ok. REFERENCES are just parsed in the CREATE TABLE statement and they are ignored for all table types except InnoDB (which supports foreign key constraints). -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysqldump doesn't quote table names
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Friday 07 March 2003 18:38, Mark Matthews wrote: Why not mysqldump --quote-names test Because I might not actually _want_ quoted names in my output. This is not about the mysqldump output. This is about the correctness of the statements mysqldump sends to the server, which is an entirely different thing and not something which should be controllable by any arguments to mysqldump. Anyway, the fix is reasonably trivial. I've already mailed a patch to [EMAIL PROTECTED]; I can resend it to someplace else if that might be more appropriate. - -- Matthias Urlichs|noris network AG|http://smurf.noris.de/ - -- Mercedes vermietet jetzt den Unterboden der A-Klasse als Werbeflche. -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+adRR8+hUANcKr/kRAnXNAKCnyhJ5E/T9/wdLEDg8vQp33nM/hgCeLsxi vS2k3eYPQM5yH6PSq2L/1O0= =9x9C -END PGP SIGNATURE- - 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
Cross tab confusion
This is my first post to the list. I could do with some pointers please. I'm building a pupil assessment record. I have these two tables: table `pupil` pupil_id name 1 jeff 2 fred 3 rita table `reading_level` record_id pupil_id week level 1 1 1 6.1 2 2 1 4.3 3 1 2 6.2 4 2 2 4.4 I'd really need to present this data thus: name week1 week2 week3 jeff 6.1 6.2 fred 4.3 4.4 I believe it will involve a cross tab query, but I'm completely lost. I suspect it may use a temp table? I've no experience of that either. Thanks for any help. -- Matt Johnson __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.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
MySQL admin
When I go into the Database tab of my SQL Admin I don't see any databases? Should I not see the ones that are in the datadir path? --- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --- - 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: HAVING behaviour
Gabriel TATARANU wrote: I had some private e-mail suggesting that MAX functions should apply to the full table - as it is the maximum value of the field- That is the case. Without a GROUP BY, max() is supposed to apply to the entire table. and this is why HAVING clause behaved in that manner. I'm sure this is not the case since MAX does obey (as it should) WHERE clause in the query. To prove my point I've decided to use another data set as example: create table tt (f1 int, f2 int); insert into tt values(1,1); insert into tt values(1,2); insert into tt values(2,3); insert into tt values(1,4); select f2 from tt where f1=1 having f2=max(f2); Empty set (0.00 sec) You draw the conclusions. In ANSI-compliant SQL, I do not think that it is legal to compare f2 to max(f2), because using an aggregate function works only after summarization, while referring to the detail works only before summarization. I am surprised that MySQL accepts the syntax at all. The claim that HAVING is executed after WHERE is usually correct (always, in ANSI-compliant SQL, I believe). I think that MySQL has extended the syntax in a useful but non-standard way which results in it violating this rule. The normal flow would be: 1) Evaluate and apply WHERE clause 2) Summarize data according to the GROUP BY, or if there is no GROUP BY generate a single summary row for the entire table. 3) Evaluate and apply HAVING clause. This *cannot* be used in the query you have above, because f2 on its own is only meaningful before summarization and max(f2) is only meaningful after summarization, yet you are comparing them. In order to evaluate this, MySQL is apparently doing the equivalent of a subquery: 1) Evaluate max(f2) for the entire table as a psuedo-subquery and remember the result 2) Evaluate and apply WHERE clause to table f2. 3) Since there is no more summarization to be done, treat the HAVING as a WHERE clause, and evaluate and apply it to the individual rows, using result remembered from (1). And those are the conclusions I draw. Bruce Feist - 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: update bug with limit syntax - MySQL Ver 4.011
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Description: It is unbelievable that the MySQL ver 4.0 have so many bug, I have been reported 2 bugs just a few days ago. Now, I have found a bug again. The bug is : When I execute select * from old_topic where FID=4 and (page=0 or page=167) order by replytime asc limit 40; returns 40 rows[40 rows in set (0.01 sec)] 23 rows value of the column page=167, and and 17 are page=0. Then I execute update old_topic set page=167 where FID=4 and (page=0 or page=167) order by replytime asc limit 40; ## mysql update old_topic set page=167 where FID=4 and (page=0 or page=167) order by replytime asc limit 40; Query OK, 40 rows affected (7.75 sec) Rows matched: 61 Changed: 40 Warnings: 0 # It tells that 40 rows are updated, but it is incorrect, as there should only 17 rows are affected because the limit 40 mysql select count(*) from old_topic where FID=4 and page=167; +--+ | count(*) | +--+ | 61 | +--+ 1 row in set (0.01 sec) [snip] Hi! I think this is a misunderstanding of how/why LIMIT applies to updates. It's not exactly the same as when used for SELECTs. The limit applies to the number of rows _changed_, not examined. Here's the relevant section from the manual: http://www.mysql.com/doc/en/UPDATE.html Paul DuBois will probably correct me if I'm wrong, but if you want to have the behavior you expect, you will either have to do it from your program based on the SELECT you have issued, or use MySQL-4.1 which has subqueries. -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.1.90 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+ahAstvXNTca6JD8RAlJ8AJ4xOpcLH2PO6ImTcZ/CuMYu/+vnPgCfas+z 3zwNaD/bQFe/7yIU6at1Nfw= =2tMz -END PGP SIGNATURE- - 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: update bug with limit syntax - MySQL Ver 4.011
At 9:45 -0600 3/8/03, Mark Matthews wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: Description: It is unbelievable that the MySQL ver 4.0 have so many bug, I have been reported 2 bugs just a few days ago. Now, I have found a bug again. The bug is : When I execute select * from old_topic where FID=4 and (page=0 or page=167) order by replytime asc limit 40; returns 40 rows[40 rows in set (0.01 sec)] 23 rows value of the column page=167, and and 17 are page=0. Then I execute update old_topic set page=167 where FID=4 and (page=0 or page=167) order by replytime asc limit 40; ## mysql update old_topic set page=167 where FID=4 and (page=0 or page=167) order by replytime asc limit 40; Query OK, 40 rows affected (7.75 sec) Rows matched: 61 Changed: 40 Warnings: 0 # It tells that 40 rows are updated, but it is incorrect, as there should only 17 rows are affected because the limit 40 mysql select count(*) from old_topic where FID=4 and page=167; +--+ | count(*) | +--+ | 61 | +--+ 1 row in set (0.01 sec) [snip] Hi! I think this is a misunderstanding of how/why LIMIT applies to updates. It's not exactly the same as when used for SELECTs. The limit applies to the number of rows _changed_, not examined. Here's the relevant section from the manual: http://www.mysql.com/doc/en/UPDATE.html Paul DuBois will probably correct me if I'm wrong, but if you want to have the behavior you expect, you will either have to do it from your program based on the SELECT you have issued, or use MySQL-4.1 which has subqueries. I'm with Mark. A LIMIT clause in an UPDATE statement limits the number of records updated, just as a LIMIT clause in a DELETE statement limits the number of records deleted. This is consistent with a LIMIT in a SELECT statement, which does not limit the number of records selected by the WHERE clause, but the number of those records that actually are returned to the client. There is one subtlety here: If you set a value to the value it currently has, that is not considered an update, and thus does not count against the limit. Note that all aspects of the behavior of LIMIT with UPDATE may easily be discovered with a little experimentation. -Mark - -- MySQL 2003 Users Conference - http://www.mysql.com/events/uc2003/ For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Mark Matthews [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
simple query
come on guys I nedsome help here! MySQL Rocks I have a set of drop downs I want to determine the dropdown menu by query? I have: ? require(connection.php); mysql_connect($DBHost, $DBUser, $DBPass) or die(could not connect); mysql_select_db($DBName); echo select name=\CountyID\ size=\1\ class='menuForm'; $result=mysql_query(SELECT County, CountyID FROM county ORDER BY County); while ($row = mysql_fetch_array($result)) { $county_id=$row['CountyID']; $county=$row['County']; echo option value=\$county_id\ $county /option; } echo /select; ? which takes us to: ? echo select name=\CityID\ size=\1\ class='menuForm'; $result=mysql_query(SELECT City, CityID FROM city ORDER BY City); while ($row = mysql_fetch_array($result)) { $city_id=$row['CityID']; $city=$row['City']; echo option value=\$city_id\ $city /option; } echo /select; ? br / ? but I want the city selction to be only where it is associated with the county? # # Table structure for table `city` # CREATE TABLE city ( CountyID int(10) unsigned NOT NULL default '0', City varchar(100) NOT NULL default '', CityID bigint(20) NOT NULL auto_increment, PRIMARY KEY (CityID), KEY CountyID (CountyID) ); Andrew - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: simple query
At 17:21 + 3/8/03, Andrew wrote: come on guys I nedsome help here! MySQL Rocks I have a set of drop downs I want to determine the dropdown menu by query? I have: ? require(connection.php); mysql_connect($DBHost, $DBUser, $DBPass) or die(could not connect); mysql_select_db($DBName); echo select name=\CountyID\ size=\1\ class='menuForm'; $result=mysql_query(SELECT County, CountyID FROM county ORDER BY County); while ($row = mysql_fetch_array($result)) { $county_id=$row['CountyID']; $county=$row['County']; echo option value=\$county_id\ $county /option; } echo /select; ? which takes us to: ? echo select name=\CityID\ size=\1\ class='menuForm'; $result=mysql_query(SELECT City, CityID FROM city ORDER BY City); while ($row = mysql_fetch_array($result)) { $city_id=$row['CityID']; $city=$row['City']; echo option value=\$city_id\ $city /option; } echo /select; ? br / ? but I want the city selction to be only where it is associated with the county? Which means what, exactly? You want only those cities to be displayed that are located in the currently-selected county? If so, that's not a MySQL question at all. It's a question of client-side programming, for example, using JavaScript. Or do you mean something else? # # Table structure for table `city` # CREATE TABLE city ( CountyID int(10) unsigned NOT NULL default '0', City varchar(100) NOT NULL default '', CityID bigint(20) NOT NULL auto_increment, PRIMARY KEY (CityID), KEY CountyID (CountyID) ); Andrew - 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
renaming
Hi, I need to change a column name. I wonder if there's any faster and simpler way to do it than: ALTER TABLE table_name CHANGE old_column_name new_column_name create_clause; Thanks for the support. Patrizio Pino Roma - Italia sql - 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
Random Selects
I have a table called testimonials: +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(3) | | PRI | NULL| auto_increment | | can_use | tinyint(1) | | | 0 || | name | varchar(64) | | | 0 || | location | varchar(64) | | | 0 || | quote| text| | | || +--+-+--+-+-++ That contains 20 or so customer testimonial comments. I want to randomly display 3-4 of them every time a page loads (using PHP). Is there some type of random selction available within MySQL, as in: SELECT RANDOM(id),name,location,quote FROM testimonials WHERE can_use=1 LIMIT 3; Or something to that effect or am I better served finding some way in PHP to do this? 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
Problem: Communication Link Failure
I have a web application that uses ConnectorJ to connect to a MySQL database. When I had MySQL on windows, I never had a problem. However, now that I'm running MySQL on a linux box, I get a weird problem: If I have not logged in to MySQL through the mysql command-line utility in a while, the web application cannot connect to the database. When it tries to connect through JDBC, it comes back with a communication link error. This continues until I log in (through a bash prompt) with the mysql command-line utility. Then the web app can suddenly get through. Does anyone know why this is? What might be causing this? How can I stop this from happening? I'm not 100% sure, but I think what might be happening is this: 1. Connection Pool Manager creates connection and returns it 2. Connection is used by app, close() called and is returned to pool 3. Connection not used for long time, mysql times it out 4. Pool manager doesn't know it's timed out, returns it when connection asked for Does this sound correct? If this is the problem, how would I fix this? Unfortunately, the javax.sql.PooledConnection and Listener interfaces don't offer any callbacks for timeouts. So how would I timeout a connection? Or should I, before returning a pooled connection, test it first? The only thing is this adds an extra trip to the DB for every time someone asks for a connection. But I don't see any other way to handle this, except maybe the timeout on a connection in the idle pool? _ Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail - 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: renaming
At 19:09 +0100 3/8/03, PaT! wrote: Hi, I need to change a column name. I wonder if there's any faster and simpler way to do it than: ALTER TABLE table_name CHANGE old_column_name new_column_name create_clause; No, that's how you do it. Thanks for the support. Patrizio Pino Roma - Italia sql - 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: HAVING behaviour
That is the case. Without a GROUP BY, max() is supposed to apply to the entire table. Not true. Use of MAX in WHERE clause will show that MAX is applied to filtered data set. To use my example data set: mysql select f2 from tt where f1=2; +--+ | f2 | +--+ |3 | +--+ 1 row in set (0.02 sec) In ANSI-compliant SQL, I do not think that it is legal to compare f2 to max(f2), because using an aggregate function works only after summarization, while referring to the detail works only before summarization. I am surprised that MySQL accepts the syntax at all. Syntax wise I agree that most SQL interpretors restrict usage on HAVING to follow GROUP BY. Usage of aggregate functions (like MAX) in HAVING is permitted AFAIK. The claim that HAVING is executed after WHERE is usually correct (always, in ANSI-compliant SQL, I believe). I think that MySQL has extended the syntax in a useful but non-standard way which results in it violating this rule. Resulting in unexpected results I may add. The normal flow would be: 1) Evaluate and apply WHERE clause 2) Summarize data according to the GROUP BY, or if there is no GROUP BY generate a single summary row for the entire table. 3) Evaluate and apply HAVING clause. This *cannot* be used in the query you have above, because f2 on its own is only meaningful before summarization and max(f2) is only meaningful after summarization, yet you are comparing them. In order to evaluate this, MySQL is apparently doing the equivalent of a subquery: 1) Evaluate max(f2) for the entire table as a psuedo-subquery and remember the result 2) Evaluate and apply WHERE clause to table f2. 3) Since there is no more summarization to be done, treat the HAVING as a WHERE clause, and evaluate and apply it to the individual rows, using result remembered from (1). Use of a subquery would solve the problem - that's clear. What it isn't so clear is the result of the query. Acording to the workflow you described the results should be f2=4 and yet the result is an empty set. And those are the conclusions I draw. Bruce Feist I'd say either HAVING need to be fixed or syntax should be changed to allow only legal cases where the results are dependable. To play guess what may happen if I write this (ala vi initiation ritual) with databases worth big money is not my cup of tea. Regards, Gabriel - 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
idle login segfault on 4.0.11a-gamma
Description: With a stale login (idle for some time), I've experienced a repeated ability to cause a seg-fault by attempting to get the status (\s). I have not tested this thoroughly. How-To-Repeat: Log into the database, verify functionality. Leave the login idle for an extended period of time (12 hours is about the timeframe with which I see the issue, but it may occur at 6 hours..) Fix: Submitter-Id: Originator:root Organization: MySQL support: none Synopsis: idle login segfault Severity: serious Priority: medium Category: mysql Class: sw-bug Release: mysql-4.0.11a-gamma (Gentoo mysql-4.0.11a.ebuild package) C compiler:gcc (GCC) 3.2.2 C++ compiler: g++ (GCC) 3.2.2 Environment: System: Linux laptop.tomki.com 2.4.20-gentoo-r1 #4 SMP Thu Mar 20 22:28:44 PST 2003 i686 Mobile Pentium II GenuineIntel GNU/Linux Architecture: i686 Some paths: /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc GCC: Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/specs Configured with: /var/tmp/portage/gcc-3.2.2-r1/work/gcc-3.2.2/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2 --includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib --enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix --enable-long-long --disable-checking --enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit --enable-version-specific-runtime-libs --with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3 --with-local-prefix=/usr/local --enable-shared --enable-nls --without-included-gettext Thread model: posix gcc version 3.2.2 Compilation info: CC='gcc' CFLAGS='-march=i686 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -O3' CXX='g++' CXXFLAGS='-march=i686 -pipe -O3 -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' ASFLAGS='' LIBC: lrwxrwxrwx1 root root 13 Apr 3 02:46 /lib/libc.so.6 - libc-2.3.2.so -rwxr-xr-x1 root root 1417643 Apr 3 02:46 /lib/libc-2.3.2.so -rw-r--r--1 root root 2553290 Apr 3 02:46 /usr/lib/libc.a -rwxr-xr-x1 root root 204 Apr 3 02:46 /usr/lib/libc.so Configure command: ./configure '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--libexecdir=/usr/sbin' '--sysconfdir=/etc/mysql' '--localstatedir=/var/lib/mysql' '--with-raid' '--with-low-memory' '--enable-assembler' '--with-charset=latin1' '--enable-local-infile' '--with-mysqld-user=mysql' '--with-extra-charsets=all' '--enable-thread-safe-client' '--with-client-ldflags=-lstdc++' '--with-comment=Gentoo mysql-4.0.11a.ebuild package' '--with-unix-socket-path=/var/run/mysqld/mysqld.sock' '--with-berkeley-db=./bdb' '--without-readline' '--enable-shared' '--enable-static' '--with-libwrap' '--with-innodb' '--with-vio' '--with-openssl' '--without-debug' 'CC=gcc' 'CFLAGS=-march=i686 -pipe -DHAVE_ERRNO_AS_DEFINE=1 -O3' 'CXXFLAGS=-march=i686 -pipe -O3 -felide-constructors -fno-exceptions -fno-rtti' 'CXX=g++' 'host_alias=i686-pc-linux-gnu' - 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: Random Selects
At 12:33 -0600 3/8/03, Darren Young wrote: I have a table called testimonials: +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(3) | | PRI | NULL| auto_increment | | can_use | tinyint(1) | | | 0 || | name | varchar(64) | | | 0 || | location | varchar(64) | | | 0 || | quote| text| | | || +--+-+--+-+-++ That contains 20 or so customer testimonial comments. I want to randomly display 3-4 of them every time a page loads (using PHP). Is there some type of random selction available within MySQL, as in: SELECT RANDOM(id),name,location,quote FROM testimonials WHERE can_use=1 LIMIT 3; Or something to that effect or am I better served finding some way in PHP to do this? ORDER BY RAND() LIMIT 3 ought to do it, unless your version of MySQL is older than 3.23.2. 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
phpMyAdmin
Anyone familiar with the GUI interface for MySQL/PHP called 'phpMyAdmin'? I'm at a point in my intensive self-study via books, tutorials, and exercises where one of the books I'm working with--trying to tie together with my graphical HTML editor--Dreamweaver: PHP Development--suggests phpMyAdmin is worth knowing as a tool for more efficient work in a production environment. When I get phpMyAdmin to show up in my browser, it looks pretty much the way the book shows it. Except that, after a few lines that are word-for-word with the book, in place of [bullet] Run SQL query/queries on ... and a flexible field in which to type in said queries, I have an error message: [bullet] Error The additional Features for working with linked Tables have been deactivated. To find out why, click here. Clicking 'here' brings me to a link to 'Documentation' and a line underneath saying 'General relation features Disabled'. Clicking on 'Documentation' brings me to what looks vaguely like directions for altering various '$cfg' strings. Needless to say, I'm leery. I'm not certain where to find these strings to alter. But more importantly, I'm not clear on what I'm being told to do. It's not as if the directions are step-by-step for a novice. And it doesn't spell out whether this will address the 'General features' being 'Disabled'. That is, will it make these 'General features' functional? May I ask your help in doping this out? Thank you. Steve Tiano
RE: phpMyAdmin
Open http://your.server.name/phpMyAdmin-2.*.*/Documentation.html#setup. If you read the docs (#3 in the initial Quick Install section tells you that the file you'll be editing is config.inc.php, in the phpMyAdmin root dir), you'll just be stepped through a simple series of table creations and editing of config.inc.php (which is trivial). -- Barry Marler Plant Genome Mapping Laboratory University of Georgia Room 229, C A G T 111 Riverbend Road Athens, GA 30602 (706)583-0164(office) (706)583-0160(fax) http://www.plantgenome.uga.edu -Original Message- From: Stephen Tiano [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 3:29 PM To: [EMAIL PROTECTED] Subject: phpMyAdmin Anyone familiar with the GUI interface for MySQL/PHP called 'phpMyAdmin'? I'm at a point in my intensive self-study via books, tutorials, and exercises where one of the books I'm working with--trying to tie together with my graphical HTML editor--Dreamweaver: PHP Development--suggests phpMyAdmin is worth knowing as a tool for more efficient work in a production environment. When I get phpMyAdmin to show up in my browser, it looks pretty much the way the book shows it. Except that, after a few lines that are word-for-word with the book, in place of [bullet] Run SQL query/queries on ... and a flexible field in which to type in said queries, I have an error message: [bullet] Error The additional Features for working with linked Tables have been deactivated. To find out why, click here. Clicking 'here' brings me to a link to 'Documentation' and a line underneath saying 'General relation features Disabled'. Clicking on 'Documentation' brings me to what looks vaguely like directions for altering various '$cfg' strings. Needless to say, I'm leery. I'm not certain where to find these strings to alter. But more importantly, I'm not clear on what I'm being told to do. It's not as if the directions are step-by-step for a novice. And it doesn't spell out whether this will address the 'General features' being 'Disabled'. That is, will it make these 'General features' functional? May I ask your help in doping this out? Thank you. Steve Tiano - 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: Random Selects
3.23.54 on Linux. And it worked. Thx. Seems to be not so random, but then with more records to sample from the randomness would increase. True? -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 2:33 PM To: Darren Young; [EMAIL PROTECTED] Subject: Re: Random Selects At 12:33 -0600 3/8/03, Darren Young wrote: I have a table called testimonials: +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(3) | | PRI | NULL| auto_increment | | can_use | tinyint(1) | | | 0 || | name | varchar(64) | | | 0 || | location | varchar(64) | | | 0 || | quote| text| | | || +--+-+--+-+-++ That contains 20 or so customer testimonial comments. I want to randomly display 3-4 of them every time a page loads (using PHP). Is there some type of random selction available within MySQL, as in: SELECT RANDOM(id),name,location,quote FROM testimonials WHERE can_use=1 LIMIT 3; Or something to that effect or am I better served finding some way in PHP to do this? ORDER BY RAND() LIMIT 3 ought to do it, unless your version of MySQL is older than 3.23.2. 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
query cache hits not counted in Com_select
In MySQL 4.0, query cache hits are counted in Qcache_hits, but not in Com_select. The documentation for Com_select implies that they should be there. Is this the intended behavior, or is it a bug? - JD - 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: Random Selects
At 15:32 -0600 3/8/03, Darren Young wrote: 3.23.54 on Linux. And it worked. Thx. Seems to be not so random, but then with more records to sample from the randomness would increase. True? Probably. However, if you check the change notes in the manual for 3.23.56, you'll see that RAND() initialization was modified to be more random for new connections. -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 2:33 PM To: Darren Young; [EMAIL PROTECTED] Subject: Re: Random Selects At 12:33 -0600 3/8/03, Darren Young wrote: I have a table called testimonials: +--+-+--+-+-++ | Field| Type| Null | Key | Default | Extra | +--+-+--+-+-++ | id | tinyint(3) | | PRI | NULL| auto_increment | | can_use | tinyint(1) | | | 0 || | name | varchar(64) | | | 0 || | location | varchar(64) | | | 0 || | quote| text| | | || +--+-+--+-+-++ That contains 20 or so customer testimonial comments. I want to randomly display 3-4 of them every time a page loads (using PHP). Is there some type of random selction available within MySQL, as in: SELECT RANDOM(id),name,location,quote FROM testimonials WHERE can_use=1 LIMIT 3; Or something to that effect or am I better served finding some way in PHP to do this? ORDER BY RAND() LIMIT 3 ought to do it, unless your version of MySQL is older than 3.23.2. 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: HAVING behaviour
Hi! On Mar 07, [EMAIL PROTECTED] wrote: Description: HAVING in SELECT is evaluated before WHERE. This is not the correct behaviour as HAVING should deal with the remainder of the WHERE selection (according to manual) I cannot understand how the following can show that HAVING in SELECT is evaluated before WHERE... How-To-Repeat: mysql: create table tt (f1 int, f2 int); Query OK, 0 rows affected (0.01 sec) mysql: insert into tt values(1,1); Query OK, 1 row affected (0.01 sec) mysql: insert into tt values(1,2); Query OK, 1 row affected (0.00 sec) mysql: insert into tt values(2,3); Query OK, 1 row affected (0.00 sec) mysql: select * from tt where f1=1 having f2=max(f2); Empty set (0.00 sec) First - about some other replies in this thread. Of course, MAX applies only to part of the table from WHERE, not to the whole table. Try SELECT MAX(f2) FROM tt WHERE f1=1; Then, when you use group functions without explicit GROUP BY it's the same as GROUP BY const - that is, group functions are applied to the whole table (or, rather, sub-table after the WHERE). And, of course, GROUP BY const (you may try to add it manually, to see what happens) will resul in only one row to be returned. And - absolutely according to SQL standards - what value each column will have (from the set of values it takes in the result set from WHERE) is *undefined*. Try: SELECT *,MAX(f2) FROM tt WHERE f1=1 GROUP BY 1+1; (check GROUP BY syntax to see why I didn't write simply GROUP BY 1) You will get +--+--+-+ | f1 | f2 | max(f2) | +--+--+-+ |1 |1 | 2 | +--+--+-+ 1 row in set (0.00 sec) Note, that max(f2) is correct, and f2's value can be either 1 or 2, in this case it happen to be 1. Naturally, 2 != 1, so your query fails. You should NEVER rely on the value of column from GROUP BY, if it's not the column you group by. Regards, Sergei -- MySQL Development Team __ ___ ___ __ / |/ /_ __/ __/ __ \/ / Sergei Golubchik [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, http://www.mysql.com/ /_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany ___/ - 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
Part Mysql part PHP question....
Hi, I have a hockey database with players names in it and I want to be able to update their stats one after the other. To be more clear - when the page is first entered I want the first players name to automatically appear showing his current stats (this will be in a form). Then you can update the record and write it back to the database, then the next player will show up with his stats showing, and the process continues until all the players have been done. Setting up the database and forms is no problem, but I'm not sure how I would keep count of what player has been done so the next one automatically appears (and if there should be a power failure orWindows crashes, or whatever else - I want the process to start at the last player being updated - I don't want to have to start again from player one). I'm not sure if this is more a PHP or MySQL question - or both - so I have sent it to both lists. Thanks C. Reeve - 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: Part Mysql part PHP question....
I think this is more of a Programming problem, but to get you started. In your database add a field call it updated make it char(1) like ALTER TABLE Hockey ADD Updated char(1) default NULL; On the first page when you start processing the players put in a programming line to update all the players like.. UPDATE Hockey SET Updated = 'N'; Then in your update page do SELECT * FROM Hockey WHERE Updated = 'N'; If there are any records in the set continue processing else go to finished page. When you update that particular players stats don't forget to SET Updated = 'Y'; Hope this helps. Roger -Original Message- From: C. Reeve [mailto:[EMAIL PROTECTED] Sent: Saturday, March 08, 2003 6:44 PM To: MySQL List Subject: Part Mysql part PHP question Hi, I have a hockey database with players names in it and I want to be able to update their stats one after the other. To be more clear - when the page is first entered I want the first players name to automatically appear showing his current stats (this will be in a form). Then you can update the record and write it back to the database, then the next player will show up with his stats showing, and the process continues until all the players have been done. Setting up the database and forms is no problem, but I'm not sure how I would keep count of what player has been done so the next one automatically appears (and if there should be a power failure orWindows crashes, or whatever else - I want the process to start at the last player being updated - I don't want to have to start again from player one). I'm not sure if this is more a PHP or MySQL question - or both - so I have sent it to both lists. Thanks C. Reeve - 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: HAVING behaviour
Description: HAVING in SELECT is evaluated before WHERE. This is not the correct behaviour as HAVING should deal with the remainder of the WHERE selection (according to manual) I cannot understand how the following can show that HAVING in SELECT is evaluated before WHERE... What I ment here is that HAVING is not evaluated last. That was my first reaction to the problem. I guess my first analysis of the problem was not the best one :-(. First - about some other replies in this thread. Of course, MAX applies only to part of the table from WHERE, not to the whole table. Try That is correct. SELECT MAX(f2) FROM tt WHERE f1=1; Then, when you use group functions without explicit GROUP BY it's the same as GROUP BY const - that is, group functions are applied to the whole table (or, rather, sub-table after the WHERE). Ok, so we're deducting here that WHERE is applied and the subset resulted is subjected to group functions. All well so far. And, of course, GROUP BY const (you may try to add it manually, to see what happens) will resul in only one row to be returned. And - absolutely according to SQL standards - what value each column will have (from the set of values it takes in the result set from WHERE) is *undefined*. Try: SELECT *,MAX(f2) FROM tt WHERE f1=1 GROUP BY 1+1; (check GROUP BY syntax to see why I didn't write simply GROUP BY 1) You will get +--+--+-+ | f1 | f2 | max(f2) | +--+--+-+ |1 |1 | 2 | +--+--+-+ 1 row in set (0.00 sec) Note, that max(f2) is correct, and f2's value can be either 1 or 2, in this case it happen to be 1. Naturally, 2 != 1, so your query fails. That make sense. This is a very good answer to my original post. But wait, read my previos post. I changed the data set, added a fourth record (1,4) and did the same thing and got nothing. That disagree with all the posts so far, including mine. Even without that, should mysql allow implicit GROUP BY without any warning ? My feeling is that mysql should at least warn the user about a possible pitfall (IIRC there is a warning about implicit join when a table is used in WHERE but not declared in the table list) or disallow the syntax altogether. You should NEVER rely on the value of column from GROUP BY, if it's not the column you group by. That's a very good statement. It should be included at least in the documentation of mysql. A very good quality post Sergei. I can't wait to hear your analysis of the latest data set. Regards, Gabriel - 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: Spam ?
Hi, I'm not sure what list this should go to, so I'm sending it to the general list. It's not about sql or queries it's more of a webmaster problem. Apologies to the offended. After sending several messages to the list I started receiving strange messages. It may be spam, it may be just a virus harvesting e-mail addresses from the list and then sending binaries attached - I can't tell because the charset looks Koreean. Maybe somebody has a clue about this. Sample attached bellow: cut here Received: from naver337.naver.com (HELO naver337) (211.218.150.17) by 0 with SMTP; Sat, 08 Mar 2003 04:32:10 + Date: Sat, 08 Mar 2003 13:32:02 +0900 (KST) From: [EMAIL PROTECTED] Subject: =?ks_c_5601- 1987?B?uN7AzyDA/LzbIL3HxtAgvsu4siA8bWFzdGVyZm9yY2VAbmF2Z XIu?= =?ks_c_5601-1987?B?Y29tPg==?= To: [EMAIL PROTECTED] Message-id: [EMAIL PROTECTED] MIME-version: 1.0 X-Mailer: NAVER Mailer 1.0 Content-type: multipart/mixed; boundary=Boundary_(ID_7dYFGzWCZdsyiOhNGcdvFA) Original-recipient: rfc822;[EMAIL PROTECTED] X-PMFLAGS: 570949760 0 1 P5A630.CNM --Boundary_(ID_7dYFGzWCZdsyiOhNGcdvFA) Content-type: multipart/alternative; boundary=Boundary_(ID_VNMNQwUzr2fCyUwiSpr4Tg) --Boundary_(ID_VNMNQwUzr2fCyUwiSpr4Tg) Content-type: Text/Plain; charset=euc-kr Content-transfer-encoding: base64 Ck5BVkVSIC0gaHR0cDovL3d3dy5uYXZlci5jb20vCi0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tCgrIssH4u+ogKG1hc3RlcmZvcmNlKSC01LK yILq4s7u9xSC43sDP IDxSZTogUmU6IEhBVklORyBiZWhhdmlvdXI+IMDMILTZwL2w+iCwsMC 6IMDMwK+3ziDA/LzbIL3H xtDH373AtM+02S4KCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL S0tLS0tLS0tLS0t Cgq89r3FwNrAxyC43sDPILq4sPwgv+u3rsDMILChtebC9yDA1r3AtM+02 S4gs6rB37+hILTZvcMg vcO1tcfPvcq9w7/ALgoKCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS 0tLS0tLS0tLS0t LS0tCg== --Boundary_(ID_VNMNQwUzr2fCyUwiSpr4Tg) Content-type: Text/HTML; charset=euc-kr Content-transfer-encoding: base64 CjxodG1sPgo8aGVhZD4KPHRpdGxlPrPXwMy59iC43sDPPC90aXRsZT 4KPHN0eWxlPgpBIHt0ZXh0 LWRlY29yYXRpb246IG5vbmV9CkE6bGluayB7Y29sb3I6IGJsdWV9CkE 6dmlzaXRlZCB7Y29sb3I6 ICM2NjY2NjZ9CkE6aG92ZXIge2NvbG9yOiAjZmY5OTMzfSAKI3JlZCB7 Y29sb3I6ICNkZDNmMDB9 - 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
[PATCH] 1 line fix for gen_lex_hash.cc
Hi, I found obvious bug that causes segmentation fault while building on sh-linux. Please apply. Regards, SUGIOKA Toshinobu. --- mysql-3.23.54a.orig/sql/gen_lex_hash.cc Thu Dec 5 18:37:06 2002 +++ mysql-3.23.54a/sql/gen_lex_hash.cc Sun Mar 9 10:13:36 2003 @@ -274,7 +274,7 @@ function_plus,function_mod); int *prva= (int*) my_alloca(sizeof(int)*function_mod); - for (i=0 ; i = function_mod; i++) + for (i=0 ; i function_mod; i++) prva[i]= max_symbol; for (i=0;isize;i++) - 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
inquiry
Dear mysql I have just downloaded mysql 3.23 for Windows and I am running XP. I have started the service ok and create a database. I thought I had set my database password ok. I have been using the book 'Teach Yourself MySQL in 21 days' by SAMS (Mark Maslakowski). When I try the statement bin\mysqladmin -p CREATE sample_db the command asks for a password. I type in the one I set and the system says mysqladmin: connect to server at 'local host' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' Does it appear that I need to install an ODBC driver? Your help is appreciated. Yours Sincerely Philip McCarthy NSW Australia - 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: inquiry
have u set the pass or is it correct ? usually mysqladmin -u root password newpassword then mysqladmin -u root -p create sample_db = Original Message From Philip McCarthy [EMAIL PROTECTED] = Dear mysql I have just downloaded mysql 3.23 for Windows and I am running XP. I have started the service ok and create a database. I thought I had set my database password ok. I have been using the book 'Teach Yourself MySQL in 21 days' by SAMS (Mark Maslakowski). When I try the statement bin\mysqladmin -p CREATE sample_db the command asks for a password. I type in the one I set and the system says mysqladmin: connect to server at 'local host' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' Does it appear that I need to install an ODBC driver? Your help is appreciated. Yours Sincerely Philip McCarthy NSW Australia - 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[2]: inquiry
Hi Philip, then mysqladmin -u root -p create sample_db This is probably the best way to go, the password you created will most likely be for the root user. mysqladmin: connect to server at 'local host' failed error: 'Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)' Does it appear that I need to install an ODBC driver? It's telling you that it cannot log you on as user ODBC with a password. As Daniel wrote, you can use mysql -u root -p to specify root user, or create a ODBC user, which will allow you to log in without specifying the user. Personally, I've created a ODBC user with root privileges on my windows dev server, so that I do not confuse myself when switching from my unix shell to my windows command prompt. Hope this explains why the error occurred. Ben - 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