mysql unicode
Hi All, I need to know, how to configure MySQL can be support unicode like Chinese (simplified and Traditional), Croation,Chezh or whatever. Thank you for explain to me Best Regard, Hery Yulianto - Before posting, please check: http://www.mysql.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: Några frågor
This is an english mailinglist. Please write in english. 1. Nej. 2. Ja, du hittar det på http://www.mysql.com/downloads/contrib.html#SEC641 On Wed, 23 Jan 2002, Jimmy Geschwind wrote: Date: Wed, 23 Jan 2002 23:22:40 +0100 From: Jimmy Geschwind [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Några frågor Hejsan 1. Kan man köra MySQL i DOS eller måste man ha Windows installerat ??? 2. Finns det något Windows baserat redskap som man kan redigera i databasens tabeller och/eller lägga till/ta bort tabeller, spalter och kolumner ??? - Before posting, please check: http://www.mysql.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
FULLTEXT sintax.
Hi there. Im having some troubles with mysql and FULLTEXT. I create one table like this: create table pets (id INT AUTO_INCREMENT NOT NULL PRIMARY KEY); alter table pets add name TEXT; alter table pets add kind TEXT; alter table pets add FULLTEXT name (name); alter table pets add FULLTEXT kind (kind); Now, I have the next rows: ID NAME KIND 1Boby Asiatic and colored 2Linda American, non fustable 3Boby Spanish, colored and kindly ... etc When I do Select * from pets where MATCH (name) against ('boby'); I´ts giving me 0 results as response... Whereis the problem, I have, boby twice and it return me 0 as result. ¿What I doing wrong? Thanks to everibody. Victor Reus. - Before posting, please check: http://www.mysql.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 output order???
Hi, I've an actually quite simple problem, so I guess someone might know an answer... I just need a single random result from my query. With an older MySQL-Version this construction worked fine but with the new one not at all: SELECT ... ORDER BY RAND() LIMIT 1 So I tried out this one: SELECT column, ... , RAND() AS random FROM table ORDER BY random I get different random values, but it does not work in combination with ORDER BY - it's just not sorted. So is there any solution for this?! Thanks in advance, Angela - Before posting, please check: http://www.mysql.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: substring replace
Hi SF, Hi, Please help me to use SQL (with mysql prompt) command to replace any digit in column. Example: Old value 123466 New value 123456 How to replace old value at fifth digit (6) to 5? You can download the MySQL manual to use it on your own machine, or access it online. Take a look at 6.3.2 String Functions and you will find a range of facilities that will allow you to achieve this (and much more)! Regards, =dn - Before posting, please check: http://www.mysql.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: DELETE returns incorrect value
Gili, When I execute DELETE FROM VALID_CACHE; where VALID_CACHE is the name of a table I get 0 rows affected even if multiple rows are deleted.. I am expecting the return value to be the number of rows which were removed. Sorry, this is expected behavior, check out second paragraph in 6.4.6 DELETE Syntax. =dn - Before posting, please check: http://www.mysql.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
ATT: Roger $ all : Re Data Sorting
Database, query THANKS TO ALL THAT HELPED, Roger, Egor, David, Anvar and anyone I missed I am runninh MySQL 3.22.32 which puts it just outside the version recommended by Roger, I tried spaces etc, even changed the to '' et etc. I think Roger might be right in the end (that my version) just don't support it ? Thanks for the help anyway - I'll post any success stories and solutions Anton - Before posting, please check: http://www.mysql.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
sub select
Hi, I know sub select would not work correct in 3.23.xx but I have a question to ask. I'd like to find top 10 ranking of my customer by amount (using order clause desc) but there are some customer have the same amount. I was solve this problem by using group by and insert it into temp table, then i use select function join temp table with main table. Could someone tell me the better way for this problem (i'd like to use only 1 sql statement)? SF example sql 1. insert into temp select *, count(*) from customer group by amount desc limit 10 -- this sql generate only 10 row in temp table 2. select customer.* from customer, temp where customer.amount = temp.amount -- this sql may be generate more than 10 row if there are many customer who has the same amount - Before posting, please check: http://www.mysql.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
Error in accept: Bad file descriptor
Hi! Todd == Todd Ratson [EMAIL PROTECTED] writes: Todd Hi All, Todd I have an OpenBSD box running mysql-3.23.47, php4.1.1 Apache 1.3.22. Todd I have been using php-nuke on it for some time now without incident Todd until today... Todd I have tried to create a new database in order to add another nuke based Todd site to this server and I can't seem to import the sql file. This file Todd is the same one I used to create the original (nuke 5.3.1) database. I Todd have tried importing it in the shell and through phpMyAdmin-2.2.3 Todd I always get an error stating that mysql cannot modify a .frm file. I Todd downloaded a new copy of the sql file in case it was corrupt but I get Todd the same error in a different .frm file. I then dumped a backup of the Todd functioning db through phpMyAdmin and tried to import this sql file into Todd a new db with the same results. Todd An example of a table create that frequently fails and the error message Todd is as follows: cut Todd MySQL said: Todd Can't create/write to file './test/nuke_authors.frm' Todd I have even tried to manually copy the files in the db Todd ie: cp -R /usr/local/mysql/var/db1/ /usr/local/var/db2/ Todd When done this way, mysql crashes when I query the db: Todd SQL-query : Todd SHOW TABLE STATUS FROM `sample` Todd MySQL said: Todd Can't read dir of './sample/' (Errcode: 9) The above is very strange error: --- (~) perror 9 Error code 9: Bad file descriptor --- This is something that should never happen. Normally the problem in cases like this are that the mysqld process doesn't have the right to read/write to the database files, but it doesn't appear to be that in this case. Todd The console is reporting the following error: Todd 020122 10:50:35 Error in accept: Bad file descriptor I wonder if the error from accept could somehow influence the error from show table status or vice versa. cut If you could generate a trace file when this happens and send it to ftp://support.mysql.com/pub/mysql/secret we would try to solve this for you. The manual section at: http://www.mysql.com/doc/M/a/Making_trace_files.html tells you everything you need to know about how to make a MySQL trace file. Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland ___/ 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
Help! Problems with ASP
Can anybody please help me with this? Some queries I try in ASP don't return any result! Executing them in the EMS MySQL Manager show that they all should return something... % Set con = Server.CreateObject (ADODB.Connection) con.Open (Driver=MySQL;SERVER=peter;DATABASE=ppm3;UID=root) set rst = con.Execute (SELECT ID FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT IFNULL('a','') FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT IFNULL(ID,'') FROM Items) Response.Write (rst.EOF br) ' -- True ?!?!?!?! set rst = con.Execute (SELECT IF(ID,ID,'') FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT COALESCE(ID,'') FROM Items) Response.Write (rst.EOF br) ' -- True ?!?!?!?! set rst = con.Execute (SELECT CONCAT('1','2') AS Result) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT 1+1 AS Result) Response.Write (rst.EOF br) ' -- True ?!?!?!?! % Please help! I'm new to MySQL, and I'm beginning to fear that it was not a good choice... Regards, Peter Bremer - Before posting, please check: http://www.mysql.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: DELETE returns incorrect value
Gili, if all rows are affected (as in your case) MySQL just discards the whole table content at once so it cannot return the number of affected rows. If you are interested in it put a dummy where clause into your statement such as 'where 10'. That causes MySQL to delete row by row and then it will give you the right number. Regards, Frank. sl wrote: When I execute DELETE FROM VALID_CACHE; where VALID_CACHE is the name of a table I get 0 rows affected even if multiple rows are deleted.. I am expecting the return value to be the number of rows which were removed. I await your response (please respond by email). Thank you, Gili - Before posting, please check: http://www.mysql.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 -- Dr. Frank Ullrich, Netzwerkadministration Verlag Heinz Heise GmbH Co KG, Helstorfer Str. 7, D-30625 Hannover E-Mail: [EMAIL PROTECTED] Phone: +49 511 5352 587; FAX: +49 511 5352 538 - Before posting, please check: http://www.mysql.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: mysqld freebsd
Ken Menzel wrote: Hi Oleg, There is some sort of thread problem with freebsd but it usuually is not that bad. How did you compile MySQL? I would recommend using the ports version of Mysql (cd /usr/ports/databases/mysql-3.23-server) . Look at the makefile if you are still havbing threads problems you can do you mean MIT-threads options ? :( it does not want to compile try compiling witht he linux threads option. I have been trying to find the time to submit this but it only happens to me once evry couple of months! (If it is the threads issue) Best of Luck, Ken P.S. I am traveling and will be back in myh office on friday. - Original Message - From: Oleg Prokopyev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 23, 2002 3:31 PM Subject: mysqld freebsd hello i got the following problem freebsd 4.4 stable mysql3.23.47 when i start it - it works - but after 10-15 minutes cpu usage became about 100% and mysqld do not responds to any query any idea? -- Regards, Oleg Prokopyev OAP4-RIPE - Before posting, please check: http://www.mysql.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 -- Regards, Oleg Prokopyev OAP4-RIPE - Before posting, please check: http://www.mysql.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: three-way join
* mike vogel thanks to all respondents! one more thing, i have 2 foreign keys in the bridge table, but not a primary key. is a primary key in the bridge necessary for this type of join to work? thanks again. Make the two foreign keys the primary key for this table, that way you prevent the possibility of a person subscribing to the same magazine twice... so you may want a 'count'-field or similar in case someone actually want more than one copy of the same magazine. :) Because you probably more often want to see all magazines subscribed for one person, and not so often all persons subscribing for one magazine, the primary key should be defined with the person primary key first: (subs_id,mag_id) Is the primary key necessary to make it work? No... as long as you make sure you do not create duplicate subscriptions (same person subscribing to the same magazine twice). Is there any reason not to define a primary key? -- Roger - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help! Problems with ASP
Try using a recordset: Set con = Server.CreateObject (ADODB.Connection) Set rst = Server.CreateObject(ADODB.Recordset) rst.Open SELECT ID FROM Items, con, 3, 3 ' Use de results of the recordset here rst.Close Nuno A. S. Gonçalves [EMAIL PROTECTED] - Original Message - From: Peter Bremer [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 9:42 AM Subject: Help! Problems with ASP Can anybody please help me with this? Some queries I try in ASP don't return any result! Executing them in the EMS MySQL Manager show that they all should return something... % Set con = Server.CreateObject (ADODB.Connection) con.Open (Driver=MySQL;SERVER=peter;DATABASE=ppm3;UID=root) set rst = con.Execute (SELECT ID FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT IFNULL('a','') FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT IFNULL(ID,'') FROM Items) Response.Write (rst.EOF br) ' -- True ?!?!?!?! set rst = con.Execute (SELECT IF(ID,ID,'') FROM Items) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT COALESCE(ID,'') FROM Items) Response.Write (rst.EOF br) ' -- True ?!?!?!?! set rst = con.Execute (SELECT CONCAT('1','2') AS Result) Response.Write (rst.EOF br) ' -- False set rst = con.Execute (SELECT 1+1 AS Result) Response.Write (rst.EOF br) ' -- True ?!?!?!?! % Please help! I'm new to MySQL, and I'm beginning to fear that it was not a good choice... Regards, Peter Bremer - Before posting, please check: http://www.mysql.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
Simple: Date Stamp mySQL and PHP
Hi all, Ive got a timestamp in a database column and basically I was wondering if there was any function in PHP to parse the date into something more readable from 20020123143547 23 Jan 2002 14:35 something like $date1= datetoreadable($date); Thanks Shannon __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! 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
Re: Is my table good indexed ?
Hi folks. I have table: mysql describe gosc; +-+-+--+-+-+ ---+ | Field | Type| Null | Key | Default | Extra | +-+-+--+-+-+ ---+ | sesja | varchar(32) binary | | PRI | | | | host| varchar(80) | YES | MUL | NULL| | | data_wej| datetime| | MUL | -00-00 00:00:00 | | | browser | varchar(100)| YES | | NULL| | | last_action | datetime| | MUL | -00-00 00:00:00 | | | id_pory1| int(3) unsigned | YES | | NULL| | | id_pory2| int(3) unsigned | YES | | NULL| | | nr_ip | varchar(15) | YES | | NULL| | | id_user | bigint(12) unsigned | | MUL | 0 | | | user_log| varchar(150)| | | 0- | | +-+-+--+-+-+ ---+ 10 rows in set (1.39 sec) I made: mysql explain select sesja,data_wej,id_user,user_log,nr_ip from gosc where date_add(last_action, interval 5 minute) now(); +---+--+---+--+-+--+---+ + | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--+---+--+-+--+---+ + | gosc | ALL | NULL | NULL |NULL | NULL | 37803 | where used | +---+--+---+--+-+--+---+ + Is my table good indexed ?? Or maybe this query above can be faster ?? Regards Ireneusz Piasecki -- Okresl Swoje potrzeby - my znajdziemy oferte za Ciebie! [ http://oferty.onet.pl ] - Before posting, please check: http://www.mysql.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: Date Stamp mySQL and PHP
Hi, have a look at http://www.php.net/manual/en/function.date.php According to your example, it would be something like: ?php $date1=date(d M Y H:i, 20020123143547); ? Regards Marcus Ive got a timestamp in a database column and basically I was wondering if there was any function in PHP to parse the date into something more readable from 20020123143547 23 Jan 2002 14:35 something like $date1= datetoreadable($date); - Before posting, please check: http://www.mysql.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 with MySQL4.0.1 speed, cpu- and memory-usage
Hello, in order to be able to use the replication features of MySQL we recently gave version 4.0.1alpha a try, since these features are reportedly more reliable in this version - although it is still alpha. Unfortunately the disadvantages - at least on our machines - don't seem to make up for the advantages: we experienced a very high server load combined with higher memory-usage than usual, the average speed dropped to a level the tested databases became almost unusable. Let me explain our setup: we're running a site-internal messaging system that handles approx. 110.000 messages per day. The databases consists of a header and a content table, the first one being a fixed-length MyISAM-table with almost 40.000.000 records, the second one is a dynamic-length MyISAM-table with some 20.000.000 records. We don't use fancy stuff like InnoDB but only very basic SELECT (on indexed columns) and INSERT statements, not even JOINs. The whole thing runs on a 850MHz dual-pentium with 4GB memory under Linux 2.4.17 and RAID1. Until now we used MySQL 3.23.32 which in our tests remains the fastest version so far, all following versions (including 3.23.47 and 4.0.1alpha) remarkably dropped in speed. Now finally to my question: is there a way to speed up 4.0.1alpha (or any other version with reliable replication), maybe a different OS (BSD is reported to be more performant but we have no experience with that so far) could help? Are there any fine-tunings in the ./configure that may have a positive effect (we didn't notice big changes in speed and memory usage when playing with these options)? Usually we would just stick with 3.23.32 but, as mentioned above, we need the slightly more advanced and reliable replication features of its successors in order to be able to distribute read accesses to several slaves while the master does all the writing stuff. Any help/comments much appreciated Marcus - Before posting, please check: http://www.mysql.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: Date Stamp mySQL and PHP
What's this? PHP on the MySQL list - such heresy!!! Do not pass go, go directly to: http://www.mysql.com/doc/D/a/Date_and_time_functions.html =dn - Original Message - From: Marcus Müller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 24 January 2002 11:17 Subject: Re: Simple: Date Stamp mySQL and PHP Hi, have a look at http://www.php.net/manual/en/function.date.php According to your example, it would be something like: ?php $date1=date(d M Y H:i, 20020123143547); ? Regards Marcus Ive got a timestamp in a database column and basically I was wondering if there was any function in PHP to parse the date into something more readable from 20020123143547 23 Jan 2002 14:35 something like $date1= datetoreadable($date); - Before posting, please check: http://www.mysql.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: Simple: Date Stamp mySQL and PHP
Oops, got it all wrong. Thought it was a real timestamp, but it's already the date, only formatted in a different way. The date() function expects a Unix-timestamp as its second argument. Thus you could try to leave the conversion to MySQL by using UNIX_TIMESTAMP(your_timestamp_column) or if you want to do it in PHP use mktime(). http://www.php.net/manual/en/function.mktime.php ?php $date1=20020123143547; $date1_year=substr($date1, 0, 4); $date1_month=substr($date1, 4, 2); $date1_day=substr($date1, 6, 2); $date1_hour=substr($date1, 8, 2); $date1_minute=substr($date1, 10, 2); $date1_second=substr($date1, 12, 2); $date=date(d M Y H:i, mktime($date1_hour, $date1_minute, $date1_second, $date1_month, $date1_day, $date1_year); ? Hope that helps Marcus have a look at http://www.php.net/manual/en/function.date.php According to your example, it would be something like: ?php $date1=date(d M Y H:i, 20020123143547); ? - Before posting, please check: http://www.mysql.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
Hoe to create indexes on existing tables
Hi, I'm a bit to Mysql. We are trying to use mysql as a backend for our Visual Basic application. I had a set of tables which I exported from Access database. But now, I want to index these tables. How do I go about that? Also, any suggestions of how cursors work with mysql would be of great help. Thanks a lot Princy. - Before posting, please check: http://www.mysql.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
Need very very Urgent help
Hi, I installed mysql-3.23.47-win version on Win NT 4.0 Workstation, but I cant start MySQL service. When I am trying to start mysql service, I get an error msg like this: Could not start the MySql service on \\SARADHI. Error 1067 : The process terminated unexpectedly. I installed mysql once again and started service with winmysqladmin.exe, but can't. Pl. Help me. Regards, Saardhi, --- InSync Information Systems Pvt. Ltd. - Before posting, please check: http://www.mysql.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: Hoe to create indexes on existing tables
I had a set of tables which I exported from Access database. But now, I want to index these tables. How do I go about that? http://www.mysql.com/doc/A/L/ALTER_TABLE.html mysql ALTER TABLE your_table ADD KEY(your_column); Hope that helps Marcus - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: ¿bug?
Hola: ¿No es posible utilizar una funcion en el default de un campo de una table? Intentando, en un campo, poner default = sysdate(), para almacenar automáticamente la fecha de inserción de cada registro, la fecha que se almacena es 00-00-0001. ¿Es esto un bug? Un saludo, Carmen - Before posting, please check: http://www.mysql.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
table description in database differs from script definition
i create table from script: create table if not exists msg00m1 ( id int primary key auto_increment, hid int not null, dsg char(10) not null, nt char(7) not null, gn char(2) not null, wot char(12) not null, k char(19) not null, k2 varchar(20) not null, wwt char(2) not null, drt char(10) not null, cr char(13) not null, cr2 varchar(14) not null, wat char(15) not null, wat2 varchar(16) not null, w char(3) not null ); and command desc msg00m1 shows: mysql desc msg00m1; +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(11) | | PRI | NULL| auto_increment | | hid | int(11) | | | 0 || | dsg | varchar(10) | | | || | nt| varchar(7) | | | || | gn| char(2) | | | || | wot | varchar(12) | | | || | k | varchar(19) | | | || | k2| varchar(20) | | | || | wwt | char(2) | | | || | drt | varchar(10) | | | || | cr| varchar(13) | | | || | cr2 | varchar(14) | | | || | wat | varchar(15) | | | || | wat2 | varchar(16) | | | || | w | char(3) | | | || +---+-+--+-+-++ 15 rows in set (0.00 sec) some columns (dsg, nt, wot, k, drt, cr, wat) declared as char in script are varchar in database... whats is going on? mysql ver 3.23.41 Roman - Before posting, please check: http://www.mysql.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: Hoe to create indexes on existing tables
|Hi, | |I'm a bit to Mysql. We are trying to use mysql as a backend for our Visual |Basic application. | |I had a set of tables which I exported from Access database. |But now, I want to index these tables. How do I go about that? | Hi! the simplest solution is to get a GUI client for MySQL, in which indexing or any other operation are as easy to do as with Access... The most famous GUIs are : MASCON, MySQLFront, MySQLGui, DBTools... Otherwise, you can still use the CREATE INDEX clause with commandlines. Check the doc it is very well explained... All urls for GUIs at www.mysql.com or www.dwam.net/mysql/ | |Also, any suggestions of how cursors work with mysql would be of great |help. | Quite the same as for Access, and the next release of MyODBC (announced for this month end) should provide full compatibility with ADO. / D W A M W 3 S P A C E / Guillaume de Lafontaine - [EMAIL PROTECTED] . Services Internet : http://www.w3space.com . Annuaire Aquitaine : http://www.aquitanet.com . Espace TeleTravail : http://www.w3workers.com . DWAM.NT Docs Resources : http://www.dwam.net |Thanks a lot | |Princy. | | |- |Please check http://www.mysql.com/Manual_chapter/manual_toc.html; before |posting. To request this thread, e-mail [EMAIL PROTECTED] | |To unsubscribe, send a message to the address shown in the |List-Unsubscribe header of this message. If you cannot see it, |e-mail [EMAIL PROTECTED] instead. | - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
perl DBD::mysql question
Hello list, the regular mysql-client returns some useful information after batch-inserts like: Query OK, 11393 rows affected (0.47 sec) Records: 11393 Duplicates: 0 Warnings: 0 I can fetch the number of effected rows in perl/DBI with $sth-rows, but is it possible to fetch the count of duplicates and warnings, or even the time that the query took to process? Regards, Paul Paul B. van den Berg email: [EMAIL PROTECTED] Department of Social Pharmacy and Pharmacoepidemiology University Centre for Pharmacy tel:31-50-361 fax:31-50-3632772 Ant. Deusinglaan 1 9713 AV Groningen Netherlands - Before posting, please check: http://www.mysql.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: It stoped working, and won't work anymore
What did you change? And the logs say? Lauren Matheson wrote: I've just bumped into the same problem - a RedHat 6.1 server that ran for 2 years with MySQL-3.22.27-1.i386 rpm's from the mysql site, and the server just died and is having identical behaviour to that describe - hangs on creating tables, mysqladmin stalls.. Any help would be much appreciated! Lauren Matheson - Before posting, please check: http://www.mysql.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: Export database
Can you be more specific? Export to what/where? Manish Mehta wrote: Hi i have 3.23.32 version of mysql. i wants to export the database from \mysql\bin\ please tell. thanks in advance Manish Mehta CORE Solucomm Limited 423 B, Hamilton Court, DLF City, Phase IV, Gurgaon, India - 122 001. Tel: +91-124-6392896 / 897 / 035 Fax:+91-124-6392036 E-mail: [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Strange MyISAMCHK warning
Since you said tables ( plural ), I hope you are not running myisamchk while the server is running. Fournier Jocelyn [Presence-PC] wrote: Hi, myisamchk shows me the following warning message on some of my tables : myisamchk -a searchjoinhardwarefr2.MYI Checking MyISAM file: searchjoinhardwarefr2.MYI Data records: 264494 Deleted blocks:1288 - check file-size - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 - check data record references index: 2 - check data record references index: 3 - check data record references index: 4 - check record links myisamchk: warning: Found 265789 partsShould be: 1723 parts What does this mean ? (I see only myisamchk -o can fixed this in my case) Thank you :) Best Regards, Jocelyn Fournier Presence-PC - Before posting, please check: http://www.mysql.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: Installing Mysql 4.0.1 on Redhat 7.2 with PHP 4.0.6
On Wed, 23 Jan 2002, Jim Lucas [jimmysql] wrote: But I am installing all the apps from the RPM's that came from Redhat.com The apps coming from Red Hat Linux work together. You have downloaded and installed a different (development ) version of MySQL. It's not compatible with the old one. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Is my table good indexed ?
You have a function on a field in the where clause, so no index can be used. Do your date_add() on the NOW() and compare it directly to the field. Ireneusz Piasecki wrote: Hi folks. I have table: mysql describe gosc; +-+-+--+-+-+ ---+ | Field | Type| Null | Key | Default | Extra | +-+-+--+-+-+ ---+ | sesja | varchar(32) binary | | PRI | | | | host| varchar(80) | YES | MUL | NULL| | | data_wej| datetime| | MUL | -00-00 00:00:00 | | | browser | varchar(100)| YES | | NULL| | | last_action | datetime| | MUL | -00-00 00:00:00 | | | id_pory1| int(3) unsigned | YES | | NULL| | | id_pory2| int(3) unsigned | YES | | NULL| | | nr_ip | varchar(15) | YES | | NULL| | | id_user | bigint(12) unsigned | | MUL | 0 | | | user_log| varchar(150)| | | 0- | | +-+-+--+-+-+ ---+ 10 rows in set (1.39 sec) I made: mysql explain select sesja,data_wej,id_user,user_log,nr_ip from gosc where date_add(last_action, interval 5 minute) now(); +---+--+---+--+-+--+---+ + | table | type | possible_keys | key | key_len | ref | rows | Extra | +---+--+---+--+-+--+---+ + | gosc | ALL | NULL | NULL |NULL | NULL | 37803 | where used | +---+--+---+--+-+--+---+ + Is my table good indexed ?? Or maybe this query above can be faster ?? Regards Ireneusz Piasecki - Before posting, please check: http://www.mysql.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_use_result, out of sync, Mysql
Hello What do to if mysql_use_result return NULL ? I can't understand ? I have only one query by connection, of course. I talk about SELECT statement in my query (not INSERT or anything else) Mysql run on linux. From time to time mysql_use_result() return NULL. I throw and catch an exception, then I try to make another query an I got 'out of sync' As mentionned in documentation, I use mysql_free_result() (even on a NULL pointer) while cathing the exception but nothing change. I have also try another mysql_use_result(), mysql_fetch_row() and mysql_free_result() in a dummy function. (by dummy, i mean nusefull) but I still got 'out of sync' Perhaps, the solution is to close and open a new connection in such a case ?. But before that, I want to understand. Thank you for your help Regards. -- Bernard CHAMBON IN2P3 / CNRS (Centre de Calcul de LYON) Tél : 04 72 69 42 18 http://www.in2p3.fr/CC - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Help to install MySql on SuSE 7.1
Alessandro, Wednesday, January 23, 2002, 9:43:00 PM, you wrote: How did you install MySQL? Is it the binary distribution from MySQL or you have compiled the software from the sources? AT I used the rpm inside the SuSE's distribution. Download the binary distribution from http://www.mysql.com/. Uninstall the SuSE's package and install the binary distribution from MySQL. Hope that will help. AT Alex -- For technical support contracts, goto https://order.mysql.com/ 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
RANDOM output order???
Angela, Thursday, January 24, 2002, 11:15:46 AM, you wrote: AH With an older MySQL-Version this construction worked fine but with the AH new one not at all: AH SELECT ... ORDER BY RAND() LIMIT 1 This should work fine. I think there are problems in your statement where you have put ... in here. The suggested example SELECT something ORDER BY RAND() LIMIT 1 works ok. AH Angela -- For technical support contracts, goto https://order.mysql.com/ 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: Can Anyone explain / help with auto_increment fields.
Matthew, Thursday, January 24, 2002, 12:30:13 AM, you wrote: MD thanks a simple but effective explination. You can insert whatever you want in that field - here applies all the rules of a primary key. But when you insert zero (or nothing), the database server will insert the next available free value. MD -Original Message- MD From: Christopher Thompson [mailto:[EMAIL PROTECTED]] MD Sent: 23 January 2002 22:29 MD To: [EMAIL PROTECTED]; [EMAIL PROTECTED] MD Subject: Re: Can Anyone explain / help with auto_increment fields. MD At 10:23 PM 1/23/2002 +, you wrote: Hi, I have a blank table for some testing. 1 of the fields (the primary key) is an auto_increment and not null. how and what do I insert into this field to start off the recordsets. also once I have set the records going say to 1, what do I then insert if anything into this field for the next record ?? can some one give me a MD brief explaination of the auto_increment field. MD Do not insert any value into that column. It will be given a value MD automagically. MD - MD Before posting, please check: MDhttp://www.mysql.com/manual.php (the manual) MDhttp://lists.mysql.com/ (the list archive) MD To request this thread, e-mail [EMAIL PROTECTED] MD To unsubscribe, e-mail [EMAIL PROTECTED] MD Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php -- For technical support contracts, goto https://order.mysql.com/ 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: Problem granting DELETE privileges on only a few tables in a
Diana, Wednesday, January 23, 2002, 7:33:35 PM, you wrote: DS Maybe you did not execute FLUSH PRIVILEGES or run mysqladmin DS flush-privileges to tell the server to reload the grant tables. DS Until this, your changes will not take effect. There is no need to run mysqladmin reload or FLUSH PRIVILEGES if you use GRANT. These are needed only if you change the privileges tables (mysql.*) manually. I have an existing database containing 28 tables, and I want to add a user to that database. I want this user to have SELECT, INSERT and UPDATE privileges on every table in the database, and DELETE privileges on ONLY 6 of those 28 tables. So I go about it with the following commands: [problem skip] -- For technical support contracts, goto https://order.mysql.com/ 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
Export database
Manish, Thursday, January 24, 2002, 8:57:01 AM, you wrote: MM Hi MM i have 3.23.32 version of mysql. i wants to export the database from MM \mysql\bin\ MM please tell. If you would like to export database, use mysqldump: http://www.mysql.com/doc/m/y/mysqldump.html If you would like to move your MySQL server installation to another place you may want to use mysqldump to save all your data. -- For technical support contracts, goto https://order.mysql.com/ 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
mysqld startup help!!
Rahadul, Thursday, January 24, 2002, 12:17:17 AM, you wrote: RK Hi, RKI installed MySQL version 3.23.47. It starts up and stop when i RK use the following command RK /etc/rc.d/init.d/mysql start RK /etc/rc.d/init.d/mysql stop RK Bu I attem to start /usr/sbin/mysqld server and edit the user table and RK update the password and user, it gives me following Fatal error RK [root /root]# /usr/sbin/mysqld RK Fatal error: Please read Security section of the manual to find out RK how to run RK mysqld as root! RK 020123 5:06:36 Aborting RK 020123 5:06:36 /usr/sbin/mysqld: Shutdown Complete Unix user accounts and MySQL user accounts are completely different and has nothing to do with each other. Please, see the manual: http://www.mysql.com/doc/C/o/Command-line_options.html -- For technical support contracts, goto https://order.mysql.com/ 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: Hoe to create indexes on existing tables
Princy, Thursday, January 24, 2002, 3:23:24 PM, you wrote: PT Hi ! PT I did try using the mysql client gui but you cant create indexes thru that. PT Also, since I've exported from access, the datatype all seem to be PT MEDIUMTEXT. PT So, when I try the create index syntax, PT ie, CREATE UNIQUE INDEX pk_code on company( ?) Take a look at: http://www.mysql.com/doc/C/R/CREATE_INDEX.html PT I am not sure what to put it the brackets. I tried by just specifying PT length ,tried char,varchar. PT It is possible for me to change the data type of a column?? Or do I have to PT recreate the tables? Yes, it is possible. Try to look for CHANGE/MODIFY at: http://www.mysql.com/doc/A/L/ALTER_TABLE.html -- For technical support contracts, goto https://order.mysql.com/ 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
table description in database differs from script definition
Roman, Thursday, January 24, 2002, 2:36:45 PM, you wrote: RZ i create table from script: RZ create table if not exists msg00m1 ( RZ id int primary key auto_increment, RZ hid int not null, RZ dsg char(10) not null, RZ nt char(7) not null, RZ gn char(2) not null, RZ wot char(12) not null, RZ k char(19) not null, RZ k2 varchar(20) not null, RZ wwt char(2) not null, RZ drt char(10) not null, RZ cr char(13) not null, RZ cr2 varchar(14) not null, RZ wat char(15) not null, RZ wat2 varchar(16) not null, RZ w char(3) not null RZ ); RZ and command desc msg00m1 shows: mysql desc msg00m1; RZ +---+-+--+-+-++ RZ | Field | Type| Null | Key | Default | Extra | RZ +---+-+--+-+-++ RZ | id| int(11) | | PRI | NULL| auto_increment | RZ | hid | int(11) | | | 0 || RZ | dsg | varchar(10) | | | || RZ | nt| varchar(7) | | | || RZ | gn| char(2) | | | || RZ | wot | varchar(12) | | | || RZ | k | varchar(19) | | | || RZ | k2| varchar(20) | | | || RZ | wwt | char(2) | | | || RZ | drt | varchar(10) | | | || RZ | cr| varchar(13) | | | || RZ | cr2 | varchar(14) | | | || RZ | wat | varchar(15) | | | || RZ | wat2 | varchar(16) | | | || RZ | w | char(3) | | | || RZ +---+-+--+-+-++ RZ 15 rows in set (0.00 sec) RZ some columns (dsg, nt, wot, k, drt, cr, wat) declared as char in script are RZ varchar in database... RZ whats is going on? Please check the manual at: http://www.mysql.com/doc/S/i/Silent_column_changes.html -- For technical support contracts, goto https://order.mysql.com/ 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
Recovery Problem
Ives, Thursday, January 24, 2002, 5:04:09 AM, you wrote: IS Hi there, IS yesterday my mysql server (running under irix) has gone away IS and took one table with it IS so i tried to recover the data with isamchk -o table_name IS unfortunalty during the recoveryprocess half of the data IS will be thrown away - is there any way to avoid this? IS bevore recovery: datafile: 4111857 byte - 1498 data sets IS after revovery: datafile: 1936768 byte - 759 data sets IS is there any way to keep the data inside without getting IS it thrown out? even if there will be some pointers pointing IS anywhere behind the end of the file... IS becouse i need the date - even if it will maybe a litte IS damaged... Try to use mysqlcheck or myisamchk. Look at: http://www.mysql.com/doc/T/a/Table_maintenance.html http://www.mysql.com/doc/U/s/Using_mysqlcheck.html See also: http://www.mysql.com/doc/D/i/Disaster_Prevention.html -- For technical support contracts, goto https://order.mysql.com/ 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
SOME ITEMS THAT YOU MAY BE INTERESTED IN OR BE ABLE TO ADVISE ME ON
These are the items that iam interested in selling.. Could you help me with some details on the goods, history, origin etc. are these worth anything and if so who would i contact with regards to selling them? and the best way to sell them ie auction etc APOLOGISE IF YOU HAVE ALREADY RECEIVED THIS E-MAIL JPEGS ARE AVAILABLE AT YOUR REQUEST MANY THANX kriss rolo tel: 0044 182760393 office (uk) 0044 1216864211 home (uk) 0044 7814294018 mobile (uk) return e-mail address [EMAIL PROTECTED] UK ONLY VEHICLE REGISTRATION NUMBER N64 CON NINTENDO 64 CONSOLE item 1 hand carved round table with metal chain link in the middle item 2 magnum laurent perrier vintage 1988 champagne item 3 miniture football on stand from euro96 signed by pele and bobby charlton item 4 is a bit more interesting. its a protana minifon attache, as u will see ive enclosed notes from a web site regarding this and you will see back in the 50's it cost $340.00 so i could imagine this to be worth a bit. it also has an original tape inside i do not know what is on this tape, but judging by who made it and the cost of the machine, the tape could have some important information on it. heres the note. The Minifon, developed in the early 1950s by Monske GMBH of Hanover(or by Protona GMBH- I'm not certain), was an ultra-miniaturized, battery operated magnetic recording device. It could not (initially at least) record the full range of sounds and was thus limited to voice recording, but it did offer easy portability in a very small package. The idea of offering a pocket dictating machine was novel, since dictation had previously been done in the office. However, it was thought that people like salesmen could take the machine on the road with them. Once on the market, the Minifon's promoters discovered that many people took advantage of the recorder's small size to make secret recordings to be used as evidence, as in court.BR BR The legitimate use of the Minifon, as a dictating machine, was somewhat problematical. Recordings made on regular dictating equipment were usually letters, and thus were normally sent almost immediately to a typist. The Minifon offered no obvious advantages over standard dictation equipment for office use, but its developers hoped to cultivate new uses for dictation equipment, such as stock taking in warehouses, or the use of the machine as a substitute for note-taking by reporters, insurance adjusters, salesmen, and others. In its original form, the Minifon was a wire recorder, using a type of wire medium developed by the Armour Research Foundation of Chicago and employed in many similar devices since the late 1940s. The machine at its introduction in 1952 had a recording time of one hour, which was remarkably long, and weighed only about 3 pounds at a time when a typical office dictating machine weighed upwards of 10 pounds. It accomplished this small size and light weight in part through the use of miniature tubes and clever mechanical design. The basic machine cost $289.50-- a price that sounds high today but was very much in line with competing office dictating machines. The parent company attempted to set up distribution, sales and service networks in the United States. It established a business office called the Minifon Export Corp in New York, and an existing company, Harvey Radio in New York City became the main distributor. Although smaller tape recorders appeared at about the same time, the main competition in the voice recording field was from an American company, Mohawk, which made a small, battery-operated cartridge tape recorder called the Migetape. Both products sold less than 10,000 units per year in the U.S.BR After a few years, the Minifon was modified to use transistors and magnetic tape, further lowering its weight and cost. By 1962 the basic machine weighed in at only 1.5 pounds. Competition by this time had helped bring the cost down to $249.50. The Minifon after about 1962 was distributed by the international conglomerate ITT through its subsidiary in the U.S., Federal Electric Corp. A little later, distribution was taken over by the ITT Distributor Products Division in Lodi, New Jersey. (I don't know whether these were the same company with different names) By the time ITT became associated with this product, it had taken on the name of Minifon Attache, and a new line of models and options appeared. These included a hi-fi model, the 978H, which sold for $330.50.Usinga two-track, 1/4 inch tape cartridge operating at 1 7/8 inches per second, the machine claimed a frequency response of up to 12,000 Hz, plus or minus 3db. The coming of magnetic tape did not completely displace wire. The Model 240 series of recorders introduced in the early 1960s were probably the last wire recorders in regular production. The 240L, at a price of $269.50 used a special long-playing wire cartridge that held 4 hours of wire. Otherwise it looked like both the tape model and the 240S,
multi-master replication
Will MySQL, at any time in the near future, support multi-master replication? We're looking at splitting some very large databases up among several machines, but we need a way to bring them back together for our stats creation databases on the backend. What we need is a way to combine databases from different machines back onto one database machine, where the databases from the different machines can be joined without the use of daisy chaining to bring it all back together. Is there some way to over come the single master replication limitation now? Thanks, -- Greg Donald [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
I deleted my root user!
Please help. I accidentally deleted the root user and now I can't do anything. How can I recreate this user with super user privileges? I'm new to MySQL so please be detailed. Thanks in advance Lisa - Before posting, please check: http://www.mysql.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: I deleted my root user!
http://www.mysql.com/doc/R/e/Resetting_permissions.html after starting mysql with the --skip-grant-tables, you'll have to execute a grant statement http://www.mysql.com/doc/G/R/GRANT.html GRANT ALL PRIVILEGES ON *.* TO root@localhost INDENTIFIED BY 'somepassword' WITH GRANT OPTION; then restart mysql without the --skip-grant-tables. thanks, -- Andrew -Original Message- From: Lisa Williams [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 10:59 AM To: [EMAIL PROTECTED] Subject: I deleted my root user! Please help. I accidentally deleted the root user and now I can't do anything. How can I recreate this user with super user privileges? I'm new to MySQL so please be detailed. Thanks in advance Lisa - Before posting, please check: http://www.mysql.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
How do you know?
How do you know what the maximum connections you can have at one time with mysql? - Before posting, please check: http://www.mysql.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: How do you know?
* Jay Paulson How do you know what the maximum connections you can have at one time with mysql? mysql show variables like max_connections; -- Roger query, table - Before posting, please check: http://www.mysql.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: How do you know?
log into the mysql command line, type show variables and look for max_connections In the last episode (Thursday 24 January 2002 11:24 am), Jay Paulson wrote: How do you know what the maximum connections you can have at one time with mysql? - Before posting, please check: http://www.mysql.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: How do you know?
Next question: How do you increase that variable? Also, is there a number that is generally considered too high or does that depend on the server you are running MySQL on? (an example would be GREAT!) thanks. - Original Message - From: Roger Baklund [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: Jay Paulson [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 10:31 AM Subject: RE: How do you know? * Jay Paulson How do you know what the maximum connections you can have at one time with mysql? mysql show variables like max_connections; -- Roger query, table - Before posting, please check: http://www.mysql.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
MyVBQL in depth help needed
I have seen this question a couple times on the mailing list, but have not seen a legitimate answer except a link to the website it can be downloaded. I have downloaded and set everything up for MyVBQL, but I am new to databases in general and have no idea where to start to even try to connect. I am using VB6 on windows 98 and trying to connect to a mysql database maindatabase but am having no luck. I am hoping someone can point me in the right direction with some code on how to connect and a little help getting started. Like I said I am new to Databases, but I have worked with VB before. Any help or code would be greatly appreciated, just don't link my back to icarz.com because I have been there and I don't know enough about databases for it to point me in the right direction. Thanks Joe Bradbury __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! 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
Re[4]: regarding the MySQL's server Caching feature
Hello Chetan, CL hi, CL I wanted to set variable query_cache_size.. CL I have tried for this as in below but the machine hangs up every time i CL am doing this... CL Any other method by which I can set this Variable..? Try to run safe_mysqld in background mode. CL shell mysqld -u root --set-variable query_cache-size=1; CL 020124 15:55:11 InnoDB:Started CL mysqld ready for connection.. You can also set variables by editing my.cnf: [mysqld] set variable=query_cache_size=1; -- For technical support contracts, goto https://order.mysql.com/ 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
FULLTEXT sintax.
Victor, Thursday, January 24, 2002, 10:59:03 AM, you wrote: VHRV Hi there. VHRV Im having some troubles with mysql and FULLTEXT. [] VHRV Now, I have the next rows: VHRV ID NAME KIND VHRV 1Boby Asiatic and colored VHRV 2Linda American, non fustable VHRV 3Boby Spanish, colored and kindly VHRV When I do VHRV Select * from pets where MATCH (name) against ('boby'); VHRV I´ts giving me 0 results as response... VHRV Whereis the problem, I have, boby twice and it return me 0 as result. VHRV ¿What I doing wrong? It's ok if the word 'Boby' is present in more than a half of rows. Please, read carefully the manual on: http://www.mysql.com/doc/F/u/Fulltext_Search.html -- For technical support contracts, goto https://order.mysql.com/ 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: MyVBQL in depth help needed
mysql, database http://shop.barnesandnoble.com/booksearch/results.asp?WRD=MySqluserid=6AF42 HL01D - Before posting, please check: http://www.mysql.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 very slow --why???
What if you run SQL questons from MySQL command line? What SQL questons are you trying to run? Simon PS yes MySQL if very fast -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 24 January 2002 17:19 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Mysql very slow --why??? Hi, I've installed Mysql on my machine, two of my machines, one on win98 and other on windows 2000. But for some reason when the developer is trying to run any query from a VB applications, it tends to slow and hang both the machines. I 'm trying to use mysql as its supposed to be faster and better performing than Access. Am I missing some parameters when I set this up? Can you tell me why it hangs my pc and I am not able to run any other program unless I kill this process. Please advice Thanks a lot - Before posting, please check: http://www.mysql.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 very slow --why???
At 05:19 PM 1/24/2002 +, [EMAIL PROTECTED] wrote: I've installed Mysql on my machine, two of my machines, one on win98 and other on windows 2000. But for some reason when the developer is trying to run any query from a VB applications, it tends to slow and hang both the machines. I 'm trying to use mysql as its supposed to be faster and better performing than Access. Am I missing some parameters when I set this up? Can you tell me why it hangs my pc and I am not able to run any other program unless I kill this process. You really need to give us a lot more information. Have you followed the tuning guide in the manual? Where are the queries bogging down? What is your table structure? Do queries outside of VB run slowly? - Before posting, please check: http://www.mysql.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 Maintenance Routines?
Hi, I'm new at the Database Maintenance Role. Can anyone tell me what are the basic things that need to be done to keep my database healthy ? i.e. I've heard that it's good to regularly rebuild indexes. How frequently should that be done ? And what is the best way to go about it. - Original Message - From: Kalok Lo [EMAIL PROTECTED] To: [EMAIL PROTECTED]; Egor Egorov [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 11:51 AM Subject: Re: how to repair bdb tables? I'm having the same need. It looks like the following is intended for MyISAM tables only: http://www.mysql.com/doc/U/s/Using_mysqlcheck.html Has anyone else had any other luck ? - Original Message - From: Egor Egorov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 23, 2002 9:41 AM Subject: how to repair bdb tables? Hello Christian, Wednesday, January 23, 2002, 2:03:18 PM, you wrote: CH Hello CH I just wondered how to repair/check a berkeley db (bdb) table. I cannot CH use (my)isamchk and neither the check table/repair table commands. CH At least without a check facility the transaction support for MySQL is CH not very usable for production servers (innodb seems to be to buggy yet, CH I saw several entries in the change log in every of the last few releasees) and also look at the output of: mysqlcheck --help -- For technical support contracts, goto https://order.mysql.com/ 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 - Before posting, please check: http://www.mysql.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: C++ API
Christopher Thompson writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For various reasons, I need a C++ API to MySQL for use in Windows (and possibly Linux as well). I know I can find one or two in the downloads/contrib section but I'm looking for suggestions. I'm quite happy with the way the C API is set up. But I want something with nice C++ wrappers, ideally something that uses the C++ Standard Library correctly (i.e. #include iostream instead of #include iostream.h). Does anyone have any suggestions? I cannot even figure out which files to start looking at... Hi! Take a look at MySQL++... -- Regards, __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Problem with UPDATE and User Variables
At 18:32 +0100 1/24/02, Peter Bremer wrote: Hi, Can anybody explain why the following does not work? SELECT @variable := value1; UPDATE table SET field1 = @variable WHERE field2 = value2; The result is always that field1 is set to NULL... Works for me, if I substitute a real value for value1. Your first statement as shown above isn't actually legal. How do you establish what value1 is? Regards, Peter Bremer - Before posting, please check: http://www.mysql.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
HOSTNAME-bin.001 ???
I found files whith names like localhost-bin.001, localhost-bin.002 in /tmp/ What are they ? Also, what does it mean that my MySQL database version is 3.23.47-log. What does -log mean ? Regards Jacob [ www.sharksforum.com | www.eksperten.dk | +45 70 27 07 67 ] - Before posting, please check: http://www.mysql.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: how to repair bdb tables?
Kalok, Thursday, January 24, 2002, 6:51:26 PM, you wrote: KL I'm having the same need. KL It looks like the following is intended for MyISAM tables only: KL http://www.mysql.com/doc/U/s/Using_mysqlcheck.html KL Has anyone else had any other luck ? Sometimes mysqlcheck works for BDB tables. -- For technical support contracts, goto https://order.mysql.com/ 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: Problem with UPDATE and User Variables
Ooops!! This seems to be a bug in EMS MySQL Manager... Sorry to bother you all... Regards Peter -Original Message- From: Paul DuBois [mailto:[EMAIL PROTECTED]] Sent: do 24 jan 2002 18:51 To: Peter Bremer; Mysql (E-mail) Subject: Re: Problem with UPDATE and User Variables At 18:32 +0100 1/24/02, Peter Bremer wrote: Hi, Can anybody explain why the following does not work? SELECT @variable := value1; UPDATE table SET field1 = @variable WHERE field2 = value2; The result is always that field1 is set to NULL... Works for me, if I substitute a real value for value1. Your first statement as shown above isn't actually legal. How do you establish what value1 is? Regards, Peter Bremer - Before posting, please check: http://www.mysql.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: HOSTNAME-bin.001 ???
Jacob Friis Larsen wrote: I found files whith names like localhost-bin.001, localhost-bin.002 in /tmp/ What are they ? Log files. Also, what does it mean that my MySQL database version is 3.23.47-log. What It means it is logging. does -log mean ? Regards Jacob [ www.sharksforum.com | www.eksperten.dk | +45 70 27 07 67 ] - Before posting, please check: http://www.mysql.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: Processlist Commands in sql/sql_parse.cc:72
On Wed, 23 Jan 2002 16:53:47 -0800 Jeremy Zawodny [EMAIL PROTECTED] wrote: In sql/sql_parse.cc:72 (roughly), a list of command names is defined: const char *command_name[]={ Sleep, Quit, Init DB, Query, Field List, Create DB, Drop DB, Refresh, Shutdown, Statistics, Processlist, Connect,Kill,Debug,Ping,Time,Delayed_insert,Change user,Binlog Dump,Table Dump, Connect Out, Register Slave }; This appears to correspond to what normally shows up in the Command field of SHOW PROCESSLIST. I can see that many of those commands follow directly from the C API. However, there are a few questions I have: (1) Can all of those show up in the SHOW PROCESSLIST output at some time or another? Yes. (2) Can someone give me an idea what these correspond to: Connect Out Init DB Change database Refresh FLUSH PRIVILEGES Quit (is this when a client closes the connection?) termination of the thread Shutdown Shutdown of MySQL server. Register Slave (when a slave first connects, before Binlog Dump?) Yes. I'd be happy to patch the manual with this documentation once it is done. So far, most of it appears not to be there. Thanks, Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 21 days, processed 483,850,069 queries (265/sec. avg) - Before posting, please check: http://www.mysql.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] -- Regards, -- For technical support contracts, go to https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED] / /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer /_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus ___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
JDBC Driver for MySQL3.23.47-1
hi, I recently installed MySQL3.23.47 and now I need the JDBC drivers for it. Does anyone know where can I find a Free JDBC driver that would work with MySQL 3.23.47-1? thanks so much --rahad - Before posting, please check: http://www.mysql.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: JDBC Driver for MySQL3.23.47-1
http://mmmysql.sourceforge.net/ On Thu, 24 Jan 2002, Rahadul Kabir wrote: hi, I recently installed MySQL3.23.47 and now I need the JDBC drivers for it. Does anyone know where can I find a Free JDBC driver that would work with MySQL 3.23.47-1? thanks so much --rahad - Before posting, please check: http://www.mysql.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
benchmarking pgsql with mysql benchmark suite
hi. i'm trying to benchmark pgsql living in cygwin on a 2K box with mysql installed normaly on windows. i get: C:\mysql\benchperl run-all-tests --host=PAVILION --server=Pg --user=n --password=x --log --comment 2x Pentium II 400mz, 256M, under vmware Got error: 'connectDBStart() -- socket() failed: errno=2 No such file or directory my ? is: is there a way to set an absolute path to the pgsql server in run or in run-all-tests so it find the pg server? or would it be easier to simply re-install mysql in the emulated unix environment of cygwin and try again. thanks in advance! 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
Getting only the latest entries in a table...
MySQL 3.23.41 on Solaris Is it possible to select only the latest entries from a table? For instance I have a table of datasets that get loaded each day. I want to find the latest date that each dataset was loaded. I thought maybe a join against itself might be the answer, but this doesn't seem to work :) SELECT B.* from lkup_info AS A, lkup_info AS B WHERE A.did = B.did AND MAX(A.date) = B.date GROUP BY A.did; But that is basically what I want... Is this possible, or do I need to maintain a table for latest updates? -- ___ __ ____ _ _ _ _ / __)( )( ) /__\( \/ )( ___) ( \( )( ___)(_ _) \__ \ )(__)( /(__)\\ / )__)) ( )__) )( (___/(__)(__)(__)\/ ()()(_)\_)() (__) It's the same thing said Pooh. - Before posting, please check: http://www.mysql.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: It stoped working, and won't work anymore
I don't know of any changes that happened right at the time that it went down. Now, the box _was_ rooted :-), but I *think* mysql going down was independent of that. Since then I've reinstalled every rpm on the system, so it should be clean. MySQL hangs as I install the rpm for it though as soon as it gets to the stage where it starts mysqld The logs say nothing unfortunately, the mysql log just records that it is starting up. Thanks, Lauren. On Thu, 24 Jan 2002, Gerald Clark wrote: What did you change? And the logs say? Lauren Matheson wrote: I've just bumped into the same problem - a RedHat 6.1 server that ran for 2 years with MySQL-3.22.27-1.i386 rpm's from the mysql site, and the server just died and is having identical behaviour to that describe - hangs on creating tables, mysqladmin stalls.. Any help would be much appreciated! Lauren Matheson - Before posting, please check: http://www.mysql.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: Processlist Commands in sql/sql_parse.cc:72
On Thursday 24 January 2002 11:44 am, Sinisa Milivojevic wrote: ?(2) Can someone give me an idea what these correspond to: ? ? ? ?Connect Out Slave connecting to master. -- MySQL Development Team For technical support contracts, visit https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ / 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: Strange MyISAMCHK warning
Of course not ;) I only run myisamchk -a on several table, and I noticed sometime a similar message (although the tables seem to work perfectly) Jocelyn - Original Message - From: Gerald Clark [EMAIL PROTECTED] To: Fournier Jocelyn [Presence-PC] [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 3:33 PM Subject: Re: Strange MyISAMCHK warning Since you said tables ( plural ), I hope you are not running myisamchk while the server is running. Fournier Jocelyn [Presence-PC] wrote: Hi, myisamchk shows me the following warning message on some of my tables : myisamchk -a searchjoinhardwarefr2.MYI Checking MyISAM file: searchjoinhardwarefr2.MYI Data records: 264494 Deleted blocks:1288 - check file-size - check key delete-chain - check record delete-chain - check index reference - check data record references index: 1 - check data record references index: 2 - check data record references index: 3 - check data record references index: 4 - check record links myisamchk: warning: Found 265789 partsShould be: 1723 parts What does this mean ? (I see only myisamchk -o can fixed this in my case) Thank you :) Best Regards, Jocelyn Fournier Presence-PC - Before posting, please check: http://www.mysql.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
DataBreeze for MySQL
Hi all MySQL'ers, We have finally completed our initial public version of the DataBreeze Web Application system that uses MySQL as the underlying SQL database. The system requires Linux(or unix), Apache, Perl, ModPerl and MySQL. As this is a MySQL specific system, feedback from the MySQL community is very important. You may download the software for evaluation at http://www.databreeze.com or simply logon and try DataBreeze directly online. I will offer a developer license to anyone that can show me a unique working DataBreeze system operating within the next week. DataBreeze is very different from typical development tools because it utilizes a pre-built application framework that requires no programming. DataBreeze provides a template environment for building database applications that list, search, explore and edit relational data. The system includes integrated menus, forms, tree-views, security, session/state management and more, all in a Web Browser. DataBreeze can also be extended through the use of Event programs using Perl. Once you create a DataBreeze database and connect to your MySQL Server, you will find Web tools for reading and editing Tables, Columns and Indexes. It also contains step-by-step SQL import/export and text import/export tools based on the MySQL Import/Export utilities. DISCLAIMER: This is not free software but nothing is hidden, the complete Perl source code is included so that you may explore how it works. Thanks, Joe Junkin DataFree Corporation [EMAIL PROTECTED] http://www.databreeze.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
temporary table?
how can i select a join and then use the resulting table in another join? i did it with a temporary table, but is there a way to do it with a single compound statement? thanks in advance! - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Optimizing and more connections
I'm trying to increase the maxium number of connections to my MySQL database but I am not sure how to do this. I've gone to the manual and it doesn't say too much (maybe i'm looking in the wrong spot?). The machine I'm running is an AMD 650 with 512 Ram on RedHat 7.1 and MySQL 3.23.41 so I found the following line in the manual: safe_mysqld -O key_buffer=64M -O table_cache=256 \ -O sort_buffer=4M -O record_buffer=1M However, it seems that I need to shut down the mysql db before I can run this. This still doesn't solve the problem of the max number of connections. I don't have a my.cnf file to change on the server so the only thing I can think of is to tack on -O max_connections=500 at the end of the line above. Is this correct? What do I need to do to maximize the preformance on my machine? 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: Linking problems
Hello, I am using Visual C++ 6.0 and I have some linking problems while trying to run the example program MFC_ex.cpp included in the downloading files in the mysql.com website. Here are the errors I get: Configuration: MFC_ex - Win32 Debug Linking... MFC_ex.obj : error LNK2001: unresolved external symbol public: __thiscall MysqlConnection::~MysqlConnection(void) (??1MysqlConnection@@QAE@XZ) MFC_ex.obj : error LNK2001: unresolved external symbol class std::basic_ostreamchar,struct std::char_traitschar __cdecl operator(class std::basic_ostreamchar,struct std::char_traitschar ,class mysql_ColDataclass const_string const ) (??6@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@std@@AAV01@ABV?$mysql_ColData@Vconst_string@Z) MFC_ex.obj : error LNK2001: unresolved external symbol public: __thiscall MysqlConnection::MysqlConnection(char const *,char const *,char const *,char const *,bool) (??0MysqlConnection@@QAE@PBD000_N@Z) MFC_ex.obj : error LNK2001: unresolved external symbol public: __thiscall MysqlResUse::~MysqlResUse(void) (??1MysqlResUse@@QAE@XZ) MFC_ex.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4 MFC_ex.obj : error LNK2001: unresolved external symbol _mysql_fetch_lengths@4 MFC_ex.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4 MFC_ex.obj : error LNK2001: unresolved external symbol _mysql_data_seek@12 MFC_ex.obj : error LNK2001: unresolved external symbol public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall SQLQuery::str(class SQLQueryParms const )const (?str@SQLQuery@@QBE?AV?$basic_strin g@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@@Z) MFC_ex.obj : error LNK2001: unresolved external symbol public: class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar __thiscall SQLQuery::str(class SQLQueryParms const ,enum query_reset) (?str@SQLQuery@@QAE?AV?$ basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABVSQLQueryParms@@W4query_reset@@@Z) MFC_ex.obj : error LNK2001: unresolved external symbol public: class MysqlRes __thiscall MysqlConnection::store(class std::basic_stringchar,struct std::char_traitschar,class std::allocatorchar const ,bool) (?store@MysqlConnection@@QAE?AVM ysqlRes@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) MFC_ex.obj : error LNK2001: unresolved external symbol protected: virtual class std::fposint __thiscall std::strstreambuf::seekoff(long,short,int) (?seekoff@strstreambuf@std@@MAE?AV?$fpos@H@2@JFH@Z) MFC_ex.obj : error LNK2001: unresolved external symbol public: unsigned int __thiscall MysqlResUse::num_fields(void)const (?num_fields@MysqlResUse@@QBEIXZ) MFC_ex.obj : error LNK2001: unresolved external symbol private: void __thiscall MysqlFieldNames::init(class MysqlResUse const *) (?init@MysqlFieldNames@@AAEXPBVMysqlResUse@@@Z) MFC_ex.obj : error LNK2001: unresolved external symbol private: void __thiscall FieldTypes::init(class MysqlResUse const *) (?init@FieldTypes@@AAEXPBVMysqlResUse@@@Z) nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Debug/MFC_ex.exe : fatal error LNK1120: 17 unresolved externals Error executing link.exe. MFC_ex.exe - 18 error(s), 0 warning(s) Thanks a lot for your help __ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! 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
Slow updates with two keys in where.
I have pasted below some queries and a table structure that I am finding to be very slow. As you can see, if I or the two keyed fields, the query takes ~7 seconds. If I just run them by themselves, it takes no measurable time. Is this something we just have to live with? Or, is there something wrong? Brian. = mysql update forum set approved='N' where id=644122 or thread=644122; Query OK, 0 rows affected (6.79 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where id=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where thread=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql select count(*) from forum; +--+ | count(*) | +--+ | 547989 | +--+ 1 row in set (0.00 sec) CREATE TABLE `forum` ( `id` int(10) unsigned NOT NULL default '0', `datestamp` datetime NOT NULL default '-00-00 00:00:00', `thread` int(10) unsigned NOT NULL default '0', `parent` int(10) unsigned NOT NULL default '0', `author` char(37) NOT NULL default '', `subject` char(255) NOT NULL default '', `email` char(200) NOT NULL default '', `host` char(50) NOT NULL default '', `email_reply` char(1) NOT NULL default 'N', `approved` char(1) NOT NULL default 'N', `msgid` char(100) NOT NULL default '', `modifystamp` int(10) unsigned NOT NULL default '0', `userid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `author` (`author`), KEY `userid` (`userid`), KEY `datestamp` (`datestamp`), KEY `subject` (`subject`), KEY `thread` (`thread`), KEY `parent` (`parent`), KEY `approved` (`approved`), KEY `msgid` (`msgid`), KEY `modifystamp` (`modifystamp`) ) Brian Moon - Phorum Dev Team - http://phorum.org Making better forums with PHP - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Getting only the latest entries in a table...
Sounds like you have a table (lkup_info) of load dates (date), in which you record fileid (did) and date. Sounds like you do not have a separate table of fileids. I'm assuming that the lkup_info table is updated synchronously with the loading of each file that the table is recording, though you didn't say that. If this table also had an auto-increment numeric primary key (lkup_info_id), and if we had a MySQL version that is still only a gleam in Monty's eye, it would be a piece of cake: SELECT * FROM lkup_info a WHERE a.lkup_info_id IN (SELECT MAX(lkup_info_id) FROM lkup_info b GROUP BY did) In the absence of sub-selects, you will need to do the subsidiary select as a preliminary step, INTO a temporary table. Then do the main select. The pain of modifying the query to work without an auto-increment primary key, and of waiting (and waiting, and waiting) for it to run, will be far worse than the pain of adding an auto-increment primary key if one is not already there. Of course, if the table is not being updated synchronously with loading of the files, all this is probably a pipe dream, for which I apologize. --Erv At 02:06 PM 1/24/2002 -0500, Anthony R. J. Ball wrote: Is it possible to select only the latest entries from a table? For instance I have a table of datasets that get loaded each day. I want to find the latest date that each dataset was loaded. I thought maybe a join against itself might be the answer, but this doesn't seem to work :) SELECT B.* from lkup_info AS A, lkup_info AS B WHERE A.did = B.did AND MAX(A.date) = B.date GROUP BY A.did; But that is basically what I want... Is this possible, or do I need to maintain a table for latest updates? - Before posting, please check: http://www.mysql.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
Varchars Vs. Chars on Read Only Table
When doing selects on a read-only myISAM packed table, are varchar fields still slower than char fields? Thanks, Michael - Before posting, please check: http://www.mysql.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
Tighly packed table
We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? Thanks, Michael Stearne - Before posting, please check: http://www.mysql.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: Slow updates with two keys in where.
MySQL can only use 1 index per query. So take your first query for example: update forum set approved='N' where id=644122 or thread=644122 it can only use the id key OR the thread key, not both. and since you have an 'or' in your query MySQL must scan the entire table for either id being 644122 or thread being 644122. thanks, -- Andrew -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: Slow updates with two keys in where. I have pasted below some queries and a table structure that I am finding to be very slow. As you can see, if I or the two keyed fields, the query takes ~7 seconds. If I just run them by themselves, it takes no measurable time. Is this something we just have to live with? Or, is there something wrong? Brian. = mysql update forum set approved='N' where id=644122 or thread=644122; Query OK, 0 rows affected (6.79 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where id=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where thread=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql select count(*) from forum; +--+ | count(*) | +--+ | 547989 | +--+ 1 row in set (0.00 sec) CREATE TABLE `forum` ( `id` int(10) unsigned NOT NULL default '0', `datestamp` datetime NOT NULL default '-00-00 00:00:00', `thread` int(10) unsigned NOT NULL default '0', `parent` int(10) unsigned NOT NULL default '0', `author` char(37) NOT NULL default '', `subject` char(255) NOT NULL default '', `email` char(200) NOT NULL default '', `host` char(50) NOT NULL default '', `email_reply` char(1) NOT NULL default 'N', `approved` char(1) NOT NULL default 'N', `msgid` char(100) NOT NULL default '', `modifystamp` int(10) unsigned NOT NULL default '0', `userid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `author` (`author`), KEY `userid` (`userid`), KEY `datestamp` (`datestamp`), KEY `subject` (`subject`), KEY `thread` (`thread`), KEY `parent` (`parent`), KEY `approved` (`approved`), KEY `msgid` (`msgid`), KEY `modifystamp` (`modifystamp`) ) Brian Moon - Phorum Dev Team - http://phorum.org Making better forums with PHP - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Varchars Vs. Chars on Read Only Table
On Thu, Jan 24, 2002 at 04:06:57PM -0500, Michael Stearne wrote: When doing selects on a read-only myISAM packed table, are varchar fields still slower than char fields? Since it's essentially a MyISAM table with compression done at the row-level, I'd expect so. But the difference has to be relatively small. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 21 days, processed 505,660,680 queries (267/sec. avg) - Before posting, please check: http://www.mysql.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: Tighly packed table
At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.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: Installing Mysql 4.0.1 on Redhat 7.2 with PHP 4.0.6
Is this what you had to do? If so, could you point me to a location on the web or in a book store to aquire knowledge on how to compile new software. I have only compiled one piece of software, Courier Mail Service. It was interesting! But, I feel that I would need a little more help with all the packages that i would have to recompile. Thanks Jim Lucas - Original Message - From: Trond Eivind Glomsrød [EMAIL PROTECTED] To: Jim Lucas [jimmysql] [EMAIL PROTECTED] Cc: Mysql [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 6:35 AM Subject: Re: Installing Mysql 4.0.1 on Redhat 7.2 with PHP 4.0.6 On Wed, 23 Jan 2002, Jim Lucas [jimmysql] wrote: But I am installing all the apps from the RPM's that came from Redhat.com The apps coming from Red Hat Linux work together. You have downloaded and installed a different (development ) version of MySQL. It's not compatible with the old one. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Installing Mysql 4.0.1 on Redhat 7.2 with PHP 4.0.6
On Thu, 24 Jan 2002, Jim Lucas [jimmysql] wrote: Is this what you had to do? No, I don't do it. If you stay with the stable version of MySQL, you avoid this problem. MySQL 4 will show up in Red Hat Linux (at least the development tree when it's declared the) stable branch, and applications will be recompiled. -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Tighly packed table
Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.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: how to repair bdb tables?
Hi! CHECK TABLE does not do anything on BDB tables. On InnoDB and MyISAM tables CHECK TABLE tries to verify the physical consistency of the table and its indexes. The way to repair InnoDB or BDB tables is to dump, drop, and reimport them. Best regards, Heikki Tuuri Innobase Oy --- Order technical MySQL/InnoDB support at https://order.mysql.com/ See http://www.innodb.com for the online manual and latest news on InnoDB Egor Egorov wrote in message ... Kalok, Thursday, January 24, 2002, 6:51:26 PM, you wrote: KL I'm having the same need. KL It looks like the following is intended for MyISAM tables only: KL http://www.mysql.com/doc/U/s/Using_mysqlcheck.html KL Has anyone else had any other luck ? Sometimes mysqlcheck works for BDB tables. -- For technical support contracts, goto https://order.mysql.com/ 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: Installing Mysql 4.0.1 on Redhat 7.2 with PHP 4.0.6
On Thu, 24 Jan 2002, Shankar Unni wrote: Should we take this offline? The Redhat packaging for MySQL calls it mysql (lowercase). MySQL AB's packaging calls it MySQL (upper/mixed case). The layout in each of those packages is quite different. But that wasn't the problem. So version 3.23.41 (the one in RH 7.2) from Red Hat is quite different from the same version (3.23.41) from MySQL AB. So the development thing is a red herring. No, it wasn't - the problem was libmysqlclient.so.10 vs libmysqlclient.so.11 -- Trond Eivind Glomsrød Red Hat, Inc. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Tighly packed table
select max(length(firstname)) from TableName; -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 4:38 PM To: Christopher Thompson Cc: [EMAIL PROTECTED] Subject: Re: Tighly packed table Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Tighly packed table
Acck! Yes, please please do that. O(n) instead of O(n^2) (*). This is a much better solution. I was trying to convert 'there exists n such that for all m where n != m, n = m, return n'. Damn logic. (*) To be honest, I'm not even sure what the runtime of my original query was. A good query optimiser would have looked at it, realised I was probably drunk, and just refused to run it. At 05:50 PM 1/24/2002 -0500, Roger Karnouk wrote: select max(length(firstname)) from TableName; -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 4:38 PM To: Christopher Thompson Cc: [EMAIL PROTECTED] Subject: Re: Tighly packed table Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.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: Tighly packed table
The problem is, this query really hurts (I don't know if it finishes) for unindexed field for 2.9 million rows. But I'm sure it will finish eventually. Michael Roger Karnouk wrote: select max(length(firstname)) from TableName; -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 4:38 PM To: Christopher Thompson Cc: [EMAIL PROTECTED] Subject: Re: Tighly packed table Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.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
Efficiently storing md5
Does anyone have a best practices for efficiently storing md5 hash values in MySQL? Since it is a 32 character string of hex numbers, I originally stored them in a char(32) binary column. But that is wasted space (by a factor of 2). And of course, these things add up, both in data files and indexes. Md5 hash-- 16 bytes. char(32) binary -- 32 bytes. BIGINT -- 8 bytes My thought right now is to convert the md5 hash into two BIGINT numbers and visa-versa. High BIGINT = conv(left(md5,16),16,10) Low BIGINT = conv(right(md5,16),16,10) And reversing: Md5 = concat(lpad(conv(high,10,16),16,'0'),lpad(conv(low,10,16),16,'0')) I suppose there is some point (in terms of the number of rows) where storing more efficiently outweighs the conversion functions, and I assume that I'm past that point. Is there a better way to convert these? Just a note: there is no 128-bit integer type and CONV() only works with up to 64-bit 8-byte numbers anyway. Sincerely, Steven Roussey http://Network54.com/?pp=e - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Tighly packed table
At 05:58 PM 1/24/2002 -0500, Michael Stearne wrote: The problem is, this query really hurts (I don't know if it finishes) for unindexed field for 2.9 million rows. But I'm sure it will finish eventually. Yes, it will really hurt. After all, there's no way for MySQL to do this other than pulling in this column one at a time from each and every row in the table and doing the string count. See if you can do a SELECT COUNT(*) FROM Table in a reasonable amount of time. If you can, you may want to do this programatically in a small C++ (or C, or whatever) program. It _may_ be faster. It may not, there'll be a lot of network traffic. SQL servers tend to be rather bad at string manipulation, something like this would be easy in C or in Perl. - Before posting, please check: http://www.mysql.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: mysqld freebsd
On Thu, Jan 24, 2002 at 12:19:12PM +0200, Oleg Prokopyev wrote: Ken Menzel wrote: Hi Oleg, There is some sort of thread problem with freebsd but it usuually is not that bad. How did you compile MySQL? I would recommend using the ports version of Mysql (cd /usr/ports/databases/mysql-3.23-server) . Look at the makefile if you are still havbing threads problems you can do you mean MIT-threads options ? :( it does not want to compile No, he means the LinuxThreads option. Jeremy -- Jeremy D. Zawodny, [EMAIL PROTECTED] Technical Yahoo - Yahoo Finance Desk: (408) 349-7878 Fax: (408) 349-5454 Cell: (408) 685-5936 MySQL 3.23.41-max: up 21 days, processed 507,895,181 queries (267/sec. avg) - Before posting, please check: http://www.mysql.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: Tighly packed table
I actually have all the records in a 1GB text file, so here comes perl to the rescue!! (Easier than C to me, maybe I'll do it in Java as an exercise.) BTW if anyone has any questions on the ability of MacOS X with medium size DBs. This DB is running on a 500Mhz iMac G3 with 1GB of RAM and Mac OS X. Which is performing as better it seems than the SCO and Linux boxes running the same DBs. Thanks, Michael Christopher Thompson wrote: At 05:58 PM 1/24/2002 -0500, Michael Stearne wrote: The problem is, this query really hurts (I don't know if it finishes) for unindexed field for 2.9 million rows. But I'm sure it will finish eventually. Yes, it will really hurt. After all, there's no way for MySQL to do this other than pulling in this column one at a time from each and every row in the table and doing the string count. See if you can do a SELECT COUNT(*) FROM Table in a reasonable amount of time. If you can, you may want to do this programatically in a small C++ (or C, or whatever) program. It _may_ be faster. It may not, there'll be a lot of network traffic. SQL servers tend to be rather bad at string manipulation, something like this would be easy in C or in Perl. - Before posting, please check: http://www.mysql.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
Which is faster VarChar(255) or Text?
I will be putting variable length text into a field (up to 255 characters but typically around 60 characters) and wonder what makes for faster retrieval? Or does it matter? A field defined as Varchar(255) or Text? It is unlikely this field will be used for searching and it will not be indexed. This table will be part of a web application so a lot of people will be doing queries on the table and this field will be displayed as a grid field in the browser. The user queries will only return10-100 records at a time but there will be a lot of simultaneous connections to the database. Any opinions on which is better? VarChar(255) or Text? TIA 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
Re: Tighly packed table
...and because no one has been really cynical... After that query runs, then prepare for a coffee overload whilst you perform the ALTER TABLE, then get ready because if you shorten the field to (say) 12 characters/bytes the very next day, someone with a 13 character name is going to try to register! I'm wondering just how much space this 'little' exercise is going to save, either as a ratio of the size of the db, or as a ratio of HDD size? My glass is half-empty! =dn - Original Message - From: Michael Stearne [EMAIL PROTECTED] To: Roger Karnouk [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: 24 January 2002 22:58 Subject: Re: Tighly packed table The problem is, this query really hurts (I don't know if it finishes) for unindexed field for 2.9 million rows. But I'm sure it will finish eventually. Michael Roger Karnouk wrote: select max(length(firstname)) from TableName; -Original Message- From: Michael Stearne [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 4:38 PM To: Christopher Thompson Cc: [EMAIL PROTECTED] Subject: Re: Tighly packed table Christopher Thompson wrote: At 04:10 PM 1/24/2002 -0500, Michael Stearne wrote: We have a somewhat large read-only table (2.9 million recs). I am wonder if there is a utility that will look at each row of each columns and come up with a summary of the largest field (in character length) for each column. For example, scan each row's firstname field and report that the longest first name is 12 characters. That way I can ALTER the firstname field to be a char or varchar of 12? What would be better BTW? I don't know if CHAR or VARCHAR is better for you but as to the query here, it would seem easiest to write a short program to query all the rows and programatically determine the longest column length. That said, you could probably set up a SQL statement for it. There's a LENGTH function in SQL, isn't there? The statement would look SIMILAR to the following: SELECT MAX(LENGTH(t1.FIRSTNAME)) AS fnamelength FROM TableFoo t1, TableFoo t2 WHERE LENGTH(t2.FIRSTNAME) = fnamelength; Looks good to me, thanks. Michael (Please note that my university SQL instructor pointed out that I wrote SQL statements backwards to anyone else he had ever taught. For that matter, I did Prolog backwards, too. :) - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
LOAD DATA INFILE - Duplicate entry '' for key...
Hi all! I bumped in a strange problem. I dumped a help table (i.e. only text) into a file. The table contains two fields: a topic (unique) field and a content field. Then performed a LOAD DATA INFILE on the resulting file in a different database with identical structure. Everything worked just fine. Later on, after some editing on the table via PHP, everything looked ok in PHP and I dumped the table once again. Guess what? LOAD DATA INFILE now says Duplicate entry '' for key 1. The table structures continue to be identical. The original data in the second database doesn't exist anymore (this is actually needed for a setup process, so the database and table are created from scratch with the same code). The dump file looks ok - similar in every way with the original - I even searched for TAB characters and there's no TAB at the beginning of any line! What gives? Did anyone else bump into this kind of problem? Thanks in advance! Bogdan - Before posting, please check: http://www.mysql.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: Slow updates with two keys in where.
Is this just something we have to live with or does MySQL 4 handle this better? Brian. - Original Message - From: Andrew Schmidt [EMAIL PROTECTED] To: Brian Moon [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, January 24, 2002 3:11 PM Subject: RE: Slow updates with two keys in where. MySQL can only use 1 index per query. So take your first query for example: update forum set approved='N' where id=644122 or thread=644122 it can only use the id key OR the thread key, not both. and since you have an 'or' in your query MySQL must scan the entire table for either id being 644122 or thread being 644122. thanks, -- Andrew -Original Message- From: Brian Moon [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 24, 2002 3:03 PM To: [EMAIL PROTECTED] Subject: Slow updates with two keys in where. I have pasted below some queries and a table structure that I am finding to be very slow. As you can see, if I or the two keyed fields, the query takes ~7 seconds. If I just run them by themselves, it takes no measurable time. Is this something we just have to live with? Or, is there something wrong? Brian. = mysql update forum set approved='N' where id=644122 or thread=644122; Query OK, 0 rows affected (6.79 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where id=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql update forum set approved='N' where thread=644122; Query OK, 0 rows affected (0.00 sec) Rows matched: 1 Changed: 0 Warnings: 0 mysql select count(*) from forum; +--+ | count(*) | +--+ | 547989 | +--+ 1 row in set (0.00 sec) CREATE TABLE `forum` ( `id` int(10) unsigned NOT NULL default '0', `datestamp` datetime NOT NULL default '-00-00 00:00:00', `thread` int(10) unsigned NOT NULL default '0', `parent` int(10) unsigned NOT NULL default '0', `author` char(37) NOT NULL default '', `subject` char(255) NOT NULL default '', `email` char(200) NOT NULL default '', `host` char(50) NOT NULL default '', `email_reply` char(1) NOT NULL default 'N', `approved` char(1) NOT NULL default 'N', `msgid` char(100) NOT NULL default '', `modifystamp` int(10) unsigned NOT NULL default '0', `userid` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`id`), KEY `author` (`author`), KEY `userid` (`userid`), KEY `datestamp` (`datestamp`), KEY `subject` (`subject`), KEY `thread` (`thread`), KEY `parent` (`parent`), KEY `approved` (`approved`), KEY `msgid` (`msgid`), KEY `modifystamp` (`modifystamp`) ) Brian Moon - Phorum Dev Team - http://phorum.org Making better forums with PHP - - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: LOAD DATA INFILE - Duplicate entry '' for key...
Just for the record, found the glitch: somehow, somebody on the way decided to change LF's into CRLF's (I remotely dumped the data and e-mailed it locally where I test the setup process, so maybe the mail agent?). I just had to replace 0x0d0a's into 0x0a's in a hex editor and everything works fine now. Bogdan On Friday 25 January 2002 01:56 am, Bogdan Stancescu wrote: Hi all! I bumped in a strange problem. I dumped a help table (i.e. only text) into a file. The table contains two fields: a topic (unique) field and a content field. Then performed a LOAD DATA INFILE on the resulting file in a different database with identical structure. Everything worked just fine. Later on, after some editing on the table via PHP, everything looked ok in PHP and I dumped the table once again. Guess what? LOAD DATA INFILE now says Duplicate entry '' for key 1. The table structures continue to be identical. The original data in the second database doesn't exist anymore (this is actually needed for a setup process, so the database and table are created from scratch with the same code). The dump file looks ok - similar in every way with the original - I even searched for TAB characters and there's no TAB at the beginning of any line! What gives? Did anyone else bump into this kind of problem? Thanks in advance! Bogdan - Before posting, please check: http://www.mysql.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
other mailing lists?
Anyone, Are there any other mailing lists about databases out there? If so, can you post a link to their site where i can register? Thanks, Mike - Before posting, please check: http://www.mysql.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