Re: Displaying the real thread PIDs.
On Sun, Aug 18, 2002 at 02:32:39AM -0400, Reid Sutherland wrote: > 'processlist' displays the current list of mysql threads as seen by mysql. > I'm looking for that same list but in real thread PID form. Right now I > need to be able to tell which thread is which at a system level. Then I'm > able to send a SIGKILL to some problem threads. > > Is there a way to get a _real_ PID list from mysql that will display all the > same things as 'processlist'? That is most likely a bad idea. I'm wagering MySQL's thread killing is cooperative, that is, it probably checks during each phase of processing whether or not it has been killed, and if it has, to safely clean up. Forcibly terminating a thread where it has no choice will not allow cleanup routines to run, which could cause undefined behavior or at the very least resource leakage. These are just guesses though. -- Michael Bacarella | Netgraft Corp | 545 Eighth Ave #401 Systems Analysis | New York, NY 10018 Technical Support | 212 946-1038 | 917 670-6982 Managed Services | http://netgraft.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
Displaying the real thread PIDs.
Hi everyone, 'processlist' displays the current list of mysql threads as seen by mysql. I'm looking for that same list but in real thread PID form. Right now I need to be able to tell which thread is which at a system level. Then I'm able to send a SIGKILL to some problem threads. Is there a way to get a _real_ PID list from mysql that will display all the same things as 'processlist'? Thanks, -reid - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: SIGPROF problem in FreeBSD 4.6 (REPOST)
On Fri, Aug 09, 2002 at 04:20:42PM -0400, David Miller wrote: > On Sun, 4 Aug 2002, Jeremy Zawodny wrote: > > Hi Jeremy; > > I didn't think my server would be doing any name resolution, particularly > while replace()ing millions of rows in a table. That said, > --skip-name-resolve *seems* to have helped. It's definately still > failing, and the ktrace is the same, so it's not two problems: [snip] > Pointers welcome. Would alternate thread libraries be helpful? Maybe. I've had mostly good luck so far using LinuxThreads. There are a few odd things, but it's better than FreeBSD's native threads. Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! <[EMAIL PROTECTED]> | http://jeremy.zawodny.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
running totals
Hi Folks, I'm using the following SQL SELECT statement to query a list of labor items. I'm able to compute my number of hours(thanks Paul) and the line amount (hours*rate=lineTotal) and now what I would like to do is to keep a running total for hours and lineTotal. Is there any way I can do that in the following SQL statement? Any ideas? SQL--- SELECT timein,timeout,workdate,rate,description, ROUNDTIME_TO_SEC(timeOut) - TIME_TO_SEC(timeIn))/60)/60),2) AS hours, ROUND(TIME_TO_SEC(timeOut) - TIME_TO_SEC(timeIn))/60)/60) * rate),2) AS lineTotal FROM labor_items WHERE woid='$woid' GROUP BY laborid END Thanks in advance, Todd Schacherl [EMAIL PROTECTED] One of the penalties for refusing to participate in politics is that you end up being governed by your inferiors. -Plato - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Calculating time fields
At 16:23 -0700 8/17/02, Todd Schacherl wrote: >Hi Folks, > >I have a MYSQL table with timeIn and a timeOut columns and I'm trying to >figure >out if I can calculate the difference within a SELECT statement. Both >fields are type TIME (e.g., 00:00:00). What units do you want the result in? To get the difference in seconds, use: TIME_TO_SEC(timeOut) - TIME_TO_SEC(timeIn) If you want the difference as a TIME, pass that result to SEC_TO_TIME(). >Thanks, > >Todd Schacherl >[EMAIL PROTECTED] > >One of the penalties for refusing to participate in politics is that you end >up being governed by your inferiors. -Plato - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Calculating time fields
Hi Folks, I have a MYSQL table with timeIn and a timeOut columns and I'm trying to figure out if I can calculate the difference within a SELECT statement. Both fields are type TIME (e.g., 00:00:00). Thanks, Todd Schacherl [EMAIL PROTECTED] One of the penalties for refusing to participate in politics is that you end up being governed by your inferiors. -Plato - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 should I enter data into foreign key fields?
Just created a table with a column named client_nr that is a foreign key referencing to my Clients table: CREATE TABLE Contacts ( contact_nrint not null auto_increment, first_namechar(30), last_namechar(30), client_nr char (30), emailchar(30), tel_1char(5), tel_2char(30), mobilechar(30), faxchar(30), tel_homechar(30), foreign key (client_nr) references Clients (client_nr), primary key (contact_nr) ) I know how to enter values using but I don't know how to enter the right key value from the Clients table. thanks for any help! -- K 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: where clause structures
EEK Tables structures :P mysql> describe CompanyDetails; +---+---+--+-+-+ + | Field | Type | Null | Key | Default | Extra | +---+---+--+-+-+ + | CompanyID | tinyint(4) unsigned | | PRI | NULL| auto_increment | | CompanyActive | enum('1','0') | | MUL | 0 | | | CompanySuspended | enum('0','1','2','3','4','5') | | MUL | 0 | | mysql> describe CompanyDNSZones; +--+ ---+--+-+-++ | Field| Type | Null | Key | Default | Extra | +--+ ---+--+-+-++ | ZoneID | int(11) | | PRI | NULL| auto_increment | | CompanyID| smallint(6) | | MUL | 0 || | ZoneName | varchar(250) | | UNI | || | ZoneServices | set('HasMail','HasMailingList','HasBackupMail','IsMegaDNS','IsSecondary') | | MUL | || - Original Message - From: "Chris Knipe" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 17, 2002 11:44 PM Subject: where clause structures > Lo everyone, > > I seem to be having a problem with the structuring of my query - more > specifically, with the WHERE clause... > > mysql> SELECT ZoneName > -> FROM CompanyDNSZones > -> LEFT JOIN CompanyDetails ON > CompanyDetails.CompanyID=CompanyDNSZones.CompanyID > -> WHERE CompanyDetails.CompanySuspended='0' AND > -> CompanyDNSZones.ZoneName='megalan.co.za' AND > -> CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR > -> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%'; > +-+ > | ZoneName| > +-+ > | megalan.co.za | > | lists.megalan.co.za | > +-+ > 2 rows in set (0.01 sec) > > How do I get it to only return the item specified in the WHERE clause? > > I explictly tell MySQL in my where clause to only return results where > CompanyDNSZones.ZoneName='megalan.co.za', so where does it fall out > returning lists.megalan.co.za as well? > > -- > me > > PS: Just for interest takes, can LEFT / RIGHT / a combination of LEFT & > RIGHT joins be used to cross-reference three or more tables, or is it > limited to 2 tables only? > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > 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
where clause structures
Lo everyone, I seem to be having a problem with the structuring of my query - more specifically, with the WHERE clause... mysql> SELECT ZoneName -> FROM CompanyDNSZones -> LEFT JOIN CompanyDetails ON CompanyDetails.CompanyID=CompanyDNSZones.CompanyID -> WHERE CompanyDetails.CompanySuspended='0' AND -> CompanyDNSZones.ZoneName='megalan.co.za' AND -> CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR -> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%'; +-+ | ZoneName| +-+ | megalan.co.za | | lists.megalan.co.za | +-+ 2 rows in set (0.01 sec) How do I get it to only return the item specified in the WHERE clause? I explictly tell MySQL in my where clause to only return results where CompanyDNSZones.ZoneName='megalan.co.za', so where does it fall out returning lists.megalan.co.za as well? -- me PS: Just for interest takes, can LEFT / RIGHT / a combination of LEFT & RIGHT joins be used to cross-reference three or more tables, or is it limited to 2 tables only? - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Replication and tmp tables
Hello, I am continuing to have what seems to be intermittent problems with replication. I have attempted to exclude temporary tables from replication by using ignore wild specifications in my.cnf on both master and slave. For some unknown reason there are times that MySQL still tries to replicate a temporary table. On the slave: nb3% mysql --version mysql Ver 11.16 Distrib 3.23.49, for redhat-linux-gnu (i386) nb3% cat /etc/my.cnf [mysqld] datadir=/usr/local/mysql/var socket=/usr/local/mysql/tmp/mysql.sock set-variable= key_buffer=256M set-variable= max_allowed_packet=1M set-variable= table_cache=256 set-variable= sort_buffer=1M set-variable= record_buffer=1M set-variable= myisam_sort_buffer_size=64M set-variable= thread_cache=8 master-host=mysql-master.prideindustries.com master-user=slaveuser master-password=slavepassword master-port=3306 server-id=200 replicate-ignore-table=base_housing.u replicate-ignore-table=base_housing.wo replicate-wild-ignore-table=%.tmp% replicate-wild-ignore-table=%.%tmp replicate-wild-ignore-table=%.temp% replicate-wild-ignore-table=%.%temp [mysqldump] quick set-variable= max_allowed_packet=16M [client] socket=/usr/local/mysql/tmp/mysql.sock nb3% mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 36 to server version: 3.23.51-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> show slave status \G *** 1. row *** Master_Host: mysql-master.prideindustries.com Master_User: copydb Master_Port: 3306 Connect_retry: 60 Log_File: db1-bin.907 Pos: 14160409 Slave_Running: No Replicate_do_db: Replicate_ignore_db: Last_errno: 1146 Last_error: error 'Table 'm2mreferral.tmp_travis_househits' doesn't exist' on query 'insert into househits_travis select * from tmp_travis_househits' Skip_counter: 0 1 row in set (0.00 sec) mysql> I don't think it should be trying to replicate this table. Any suggestions would be greatly appreciated. Thanks, Bill +- | Bill MacAllister, Senior Programmer | PRIDE Industries | Phone: 916-788-2402 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 want to add up in a select Statement
> sqlst = "update sfproducts set projectdonations = projectdonations + > &testvalue WHERE prodID = '" & sProdID & "'" ^^ $sqlst = "update sfproducts set projectdonations = projectdomains + " . $testvalue . "WHERE prodID = '" . $sProdID . "'"; $sqlstr then looks like this: update sfproducts set projectdonations = projectdomains + 1 WHERE prodID = '1' if $testvalue and $sProdID had the value of 1 for example. -- me - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 want to add up in a select Statement
Hi If I do this and projectdonations is say 5 sqlst = "update sfproducts set projectdonations = projectdonations + 1 WHERE prodID = '" & sProdID & "'" projectdonations then = 6 - great however the number I want to add is in a variable called test value and if I do this and say testvalue is 66 sqlst = "update sfproducts set projectdonations = projectdonations + &testvalue WHERE prodID = '" & sProdID & "'" projectdonations then = 566 so its appending rather than adding. Im sure its just a syntax thing but for the life of me I can work it out pointers appreciated. Regards John Berman - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Words in fulltext search
Hi. I'd like to know is it safe to tune mysql-4.0.2/myisam/ft_parser.c #define true_word_char(X) (isalnum(X) || (X)=='_') to #define true_word_char(X) (isgraph(X) && (X)!='@') Or is anywhere better place to redefine chars which are "accepted" by fulltext search ? Regards. -- Grzegorz - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: [PHP] RE: Strange PHP + MySQL add / update issue with NULLvalues
That is what PHP / MySQL seems to be doing to the query once it is sent. I want to pass NULL to the column not a blank field (i.e. "" for text and 0 for numbers). If I do INSERT INTO table SET required_field ="" I get the same results. NULL means no value at all and "" is a empty string which in MySQL terms are two completely different things. I have also noticed another weird issue: UPDATE table SET required_field = NULL, notrequired_field = NULL WHERE id = '2' Results in: idrequired_field notrequired_field 2 NULL This is strange... All of my NOT NULL columns result in '' data instead of NULL but colunms that do not have a NOT NULL constraint do result in NULL! Dan > Try this instead: > > INSERT INTO table SET required_field ="" > >> -Original Message- >> From: Dan Tappin [mailto:[EMAIL PROTECTED]] >> Sent: Saturday, August 17, 2002 12:56 PM >> To: [EMAIL PROTECTED]; [EMAIL PROTECTED] >> Subject: Strange PHP + MySQL add / update issue with NULL values >> >> >> I have a table where I have specified several columns which I >> have specified >> that NULL values are not allowed. >> >> I have created a PHP based create / update / delete page where users can >> update the table. >> >> I have an INSERT script that takes the user input and generates the >> following query statement. >> >> Insert: >> >> INSERT INTO table SET required_field = NULL >> >> I have set the required field to NULL which results in an error because >> naturally this is a required field. If I use an actual value the >> query runs >> fine and the row is added. >> >> >> Now I have another page that allows the user to update the existing rows. >> >> Update: >> >> UPDATE table SET required_field = NULL WHERE id = '2' >> >> This assumes that the user has cleared a required field and is >> attempting to >> enter NULL data for a required field. If I execute this directly in mysql >> the query fails (0 rows touched). >> >> If I execute this via PHP from the web page the row is updated >> but it passes >> "" instead of NULL so the row is updated. The query above is echoed right >> from the web page and pasted into MySQL. >> >> Any idea? >> >> Thanks, >> >> Dan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 PHP + MySQL add / update issue with NULL values
Try this instead: INSERT INTO table SET required_field ="" > -Original Message- > From: Dan Tappin [mailto:[EMAIL PROTECTED]] > Sent: Saturday, August 17, 2002 12:56 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Strange PHP + MySQL add / update issue with NULL values > > > I have a table where I have specified several columns which I > have specified > that NULL values are not allowed. > > I have created a PHP based create / update / delete page where users can > update the table. > > I have an INSERT script that takes the user input and generates the > following query statement. > > Insert: > > INSERT INTO table SET required_field = NULL > > I have set the required field to NULL which results in an error because > naturally this is a required field. If I use an actual value the > query runs > fine and the row is added. > > > Now I have another page that allows the user to update the existing rows. > > Update: > > UPDATE table SET required_field = NULL WHERE id = '2' > > This assumes that the user has cleared a required field and is > attempting to > enter NULL data for a required field. If I execute this directly in mysql > the query fails (0 rows touched). > > If I execute this via PHP from the web page the row is updated > but it passes > "" instead of NULL so the row is updated. The query above is echoed right > from the web page and pasted into MySQL. > > Any idea? > > Thanks, > > Dan > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > 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
Strange PHP + MySQL add / update issue with NULL values
I have a table where I have specified several columns which I have specified that NULL values are not allowed. I have created a PHP based create / update / delete page where users can update the table. I have an INSERT script that takes the user input and generates the following query statement. Insert: INSERT INTO table SET required_field = NULL I have set the required field to NULL which results in an error because naturally this is a required field. If I use an actual value the query runs fine and the row is added. Now I have another page that allows the user to update the existing rows. Update: UPDATE table SET required_field = NULL WHERE id = '2' This assumes that the user has cleared a required field and is attempting to enter NULL data for a required field. If I execute this directly in mysql the query fails (0 rows touched). If I execute this via PHP from the web page the row is updated but it passes "" instead of NULL so the row is updated. The query above is echoed right from the web page and pasted into MySQL. Any idea? Thanks, Dan - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: For all you people looking for mysql shirts ;-)
Where is the Dolphin - Original Message - From: "Colin Faber" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 16, 2002 7:59 PM Subject: For all you people looking for mysql shirts ;-) > Hi guys, > > Just an FYI, We've finally decided to license out our logo to > CafePress.com > with the MySQL Developer logo. You can buy shirts, mugs, tote bags and > more > If you have a chance please check it out. Here is the link > > http://www.cafeshops.com/cp/store.aspx?s=mysqldeveloper.0 > > > P.S. Sorry in advance if anyone is offended by this post. > > > FILTER FODDER{ SQL, SELECT, DATABASE } > > -- > Colin Faber > (303) 736-5160 > fpsn.net, Inc. > > * Black holes are where God divided by zero. * > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
快速有效治疗强直性脊柱炎
mysqlÄúºÃ! Ìì½òÊб±´óҽԺǿֱ¿Æ¼Ì³ÐÖйú´«Í³Ò½Ñ§µÄ¾«Ë裬·¢¾ò³öÁËÇ峯Ãñ¼äÌØЧÖÎÁÆÇ¿Ö±ÐÔ¼¹ÖùÑ×µÄ"ÎâÊÏ"ÖÐÒ½ÁÆ·¨£¬ÓÐЧÖÎÁÆÇ¿Ö±¼¹ÖùÑס£ ¸ÃÁÆ·¨²ÉÓöÀÌصĽ«Ö²¡Òò×ӰγöÌåÍâµÄ·½·¨,Ó¦ÓÃÏÊÖвÝÒ©Íâ·óÖÎÁÆ£¬ÎÞÐè¿Ú·þ£¬ÎÞ¶¾¸¶×÷ÓÃ, ¸ü²»»áÉ˼°³¦Î¸, Ò»°ãÇé¿öÖ»ÐèÁ½¸öÁƳÌ15Ìì ×óÓÒ¼´¿Éʹ»¼Õß½â³ý²¡Í´¡£ ¾Öڶ໼ÕßÁÙ´²Ê¹Óã¬Ö¤Êµ¸ÃÁÆ·¨¶ÔÇ¿Ö±ÐÔ¼¹ÖùÑ×µÄÓÐЧÂÊ¿É´ï90%ÒÔÉÏ£¬ÖÎÁƺ󸴷¢Âʼ«µÍ¡£ÄÜ¿ìËÙÓÐЧֹʹ¡£ ÏêÇé²ÎÔÄÍøÕ¾£ºhttp://www.xfzg.com 24Сʱ×Éѯµç»°£º022-27276811 022-27278031´ÞÖ÷ÈÎ Ö Àñ! Ìì½òÊб±´óÒ½Ôº [EMAIL PROTECTED] 2002.8 - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: Urgent: lost connections,
Lo Victoria FreeBSD 4.6-STABLE (Master), MySQL 3.23.51 Windows 2000 Professional (Slave):, MySQL 3.23.49-nt I've recompiled the master about three times now, and it still crashed. Eventually, it came to such a extend that the moment I open port 3306 MySQL would crash. I can just use telnet 3306, or open a netcat on port 3306, and MySQL would die. So far, the only way I found to keep the FreeBSD Port up, was to recompile it with debug support. I so far have 90 minutes uptime on the Master with debug support compiled in, but it's needless to say not really the desired result. I also don't think it's got anything to do with the replication. In my attempts to debug this, I've disabled (shut down), the slave mysql server, and the master would still crash the moment I open a tcp socket... It also doesn't seem to be a generic system library or something as the error log states, because I have *nothing* else on my box that is giving me any problems... If it where to be a shared lib used by many applications, surely more than just MySQL would have been dying because of the faulty / corrupted library. -- me - Original Message - From: "Victoria Reznichenko" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 17, 2002 5:13 PM Subject: Re: Urgent: lost connections, > Chris, > Saturday, August 17, 2002, 2:04:40 AM, you wrote: > > CK> Lo everyone, > > CK> I've implemented replication on my MySQL Server... The master is mysql 3.23 > CK> (FreeBSD Ports), and my one and only slave is mysql 3.23 (Win32). I added > CK> the slave so that I can have a hardcopy / backup database in the event that > CK> I have a data loss on the master. > > "3.23" says almost nothing about MySQL server. What exact version do you run > at master and slave? > > > > > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ >__ ___ ___ __ > / |/ /_ __/ __/ __ \/ /Victoria Reznichenko > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net ><___/ www.mysql.com > > > > > - > Before posting, please check: >http://www.mysql.com/manual.php (the manual) >http://lists.mysql.com/ (the list archive) > > To request this thread, e-mail <[EMAIL PROTECTED]> > To unsubscribe, e-mail <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 ERROR 1133 MEANING?
Hi! > "duo" == duo fu <[EMAIL PROTECTED]> writes: duo> Hi friends: duo> I try to grant privileges to a user named 'glen' but not succeed. Here is duo> the script: mysql> select * from user where User='glen'; duo> | localhost | glen |... mysql> grant all privileges on test.* to 'glen'@'localhost' identified by duo> 'tidbs1'; duo> ERROR 1133: Can't find any matching row in the user table I agree that the above is very strange. The above error means that MySQL could not find an entry with hostname=localhost and user='glen' in the privilege cache. Which MySQL version are you using ? Could you please check if the above command works after 'flush privileges'. If not, could you upload the mysql privilege tables (or a copy of the tables that shows this problem) to: ftp://support.mysql.com/pub/mysql/secret and we will try to repeat this. 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
Feature Request: --log-update to add 'drop table' after 'create temporarytable'
Hi! > "Daniel" == Daniel Kasak <[EMAIL PROTECTED]> writes: Daniel> Would it be possible to add a 'drop table' command when a connection Daniel> which has made a temporary table has been dropped, to make the logs Daniel> match up with what actually happens? Thanks! The later MySQL 3.23 and 4.0.3 version already logs drop table into the MySQL binary log. 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
Re: Query slowing down, need advice
Thanks for your input. Especially Tod for breaking it down at the hard ware level and making me realize what is possible. I have re-evaluated how this is going to work. Instead of trying this with one query, I am using 2. I forget somethimes that MySQL is better at running simple queries really fast than complex single queries. I am now using Full-Text indexing (people will just have to upgrade) to retrieve any id of a row matching my search criteria eg. select id from single_table where MATCH (body,author,subject) AGAINST ('search criteria') I then read all those id in from the results. That takes .2 seconds on my server. I then feed those results (current 4450 rows) into a second query. select id from single_table where approved='Y' and id in ( big id list ) order by datestamp desc That query takes .2 seconds. id is the primary key so look ups on it are really fast. There is a key on approved, datestamp as well. >From that I have the rows I am looking for. All in .4 seconds. This is with 1Mil+ rows. The speed is consistent for all search criteria. Brian Moon Phorum Dev Team - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: mysqlbinlog - doesn't work on some log files
Eric, try using the mysqlbinlog program from some other version, maybe 4.0.0, or 3.23.xx. I noticed a similar bug a while ago. mysqlbinlog seg faulted on a binlog file. I am forwarding this bug report to our replication expert. Best regards, Heikki ... Hi, I deleted a db I didn't mean to. I am using mysql 4.0.1 Alpha and some innodb and some myisam tables. I have the log files I need to restore my data since I have been running since the last backup with binlog enabled in my.cnf. The problem is that mysqlbinlog shows some log files, but other log files choke. In VI I can see this at the top of one of one log file: þbin¢>.=.K.. 0010 00 01 00 00 00 00 00 02 00 34 2e 30 2e 31 2d 61 .4.0.1-a 0020 6c 70 68 61 2d 6c 6f 67 00 00 00 00 00 00 00 00 lpha-log 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0040 00 00 00 00 00 00 00 00 00 00 00 a2 3e 06 3d 77 ...¢>.=w 0050 40 06 3d 02 01 00 00 00 f2 00 00 00 02 00 00 00 @.=.ò... 0060 00 00 c1 1b 00 00 00 00 00 00 0a 00 00 73 65 6e ..Á..sen 0070 73 69 74 69 6c 6c 65 00 55 50 44 41 54 45 20 75 sitille.UPDATE u 0080 61 5f 70 72 69 6d 61 72 79 5f 68 69 74 73 20 53 a_primary_hits S 0090 45 54 20 31 31 64 61 79 20 3d 20 28 31 31 64 61 ET 11day = (11da 00a0 79 20 2b 20 31 29 2c 20 31 31 75 5f 64 61 79 20 y + 1), 11u_day 00b0 3d 20 28 31 31 75 5f 64 61 79 20 2b 20 31 29 2c = (11u_day + 1), 00c0 20 4d 6f 6e 74 68 5f 54 6f 74 61 6c 20 3d 20 28 Month_Total = ( 00d0 4d 6f 6e 74 68 5f 54 6f 74 61 6c 20 2b 20 31 29 Month_Total + 1) 00e0 2c 20 4d 6f 6e 74 68 5f 55 6e 69 71 75 65 20 3d , Month_Unique = 00f0 20 28 4d 6f 6e 74 68 5f 55 6e 69 71 75 65 20 2b (Month_Unique + but mysqlbinlog only shows this for this 4.8M file: root@www194:/home/back# mysqlbinlog www194-bin.001 # at 4 #020611 11:17:06 server id 1 Start: binlog v 1, server v created 691231 16:00:00 # at 73 #030419 19:03:44 server id 104888125 Query thread_id=15859712 exec_time=131072 use ; LOAD DATA INFILE '' REPLACE INTO TABLE nsitille OPTIONALLY ENCLOSED BY '\0' ESCAPED BY '\0' LINES STARTING BY '\0'; I had been running this machine as a Master to a remote slave. And some of the logs are large because I ran LOAD DATA FROM MASTER a few times from the slave machine. So I have the data I need but I can't access it. I have a total of 8 log files, only two work with mysqlbinlog. The rest return very shortly like above. This is really freaking me out, if this doesn't work, then I will have to start not trusting the log at all, which would suck. I have been able to restore data before, in the same way, from this same database and config. Thanks, Eric - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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 query in MySQL 4
Tac, Saturday, August 17, 2002, 12:57:24 AM, you wrote: T> A simple query in MySQL 4 that gets a count from 3 inner joined tables: T> select count(*) as C from quotes q inner join articles a using (article_id) T> inner join media m using (media_id) T> article_id and media_id are int(11), and are the primary keys for their T> respective tables. When used as foreign keys, they are also int(11), and T> are indexed. It's taking about 10 seconds to return the count, ~3000, from T> tables that aren't all that big (quotes: 3000, articles: 100,000; media: T> 1500). T> I plan to use the new MySQL 4 row count feature soon, but the code I'm T> working on needs to work on both MySQL 3 and 4 for now. T> I believe that the query works significantly faster on MySQL 3. T> Any ideas? Could you show the output of EXPLAIN SELECT? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: RE: Count and group by problems
Menard, Friday, August 16, 2002, 8:44:38 PM, you wrote: M> Me again M> I found a work around to my problem: M> select country, count(distinct client_name, client_address, etc..) clients M> from addresses group by country M> But I still don't understand why the below would not work. I downloaded the M> 3.# version of the OBDC but that didn't seem to help. I tested it with MyODBC 3.51 and it works fine. -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Urgent: lost connections,
Chris, Saturday, August 17, 2002, 2:04:40 AM, you wrote: CK> Lo everyone, CK> I've implemented replication on my MySQL Server... The master is mysql 3.23 CK> (FreeBSD Ports), and my one and only slave is mysql 3.23 (Win32). I added CK> the slave so that I can have a hardcopy / backup database in the event that CK> I have a data loss on the master. "3.23" says almost nothing about MySQL server. What exact version do you run at master and slave? -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Victoria Reznichenko / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: InnoDB on FreeBSD-Alpha problem
Heikki, > if you can compile with the gcc -g option and run mysqld inside gdb, > then > you probably see in what function and line it crashes. That's what I am going to do. > If you just take a connection to mysqld, it does not execute InnoDB code > at > all. Well I was connecting to it before ok, but it was w/out InnoDB and older version. Yesterday I upgraded it to new stable and added InnoDB all at once. So I am not really sure it the bug was introduced with the new stable version or InnoDB enabling. Sounds more reasonable that it's just in the new stable version vs. InnoDB since it's in connect time. > .So the bug is probably in the network code of MySQL or the > libraries > involved, for example, glibc. I guess that libraries are always involved > in > network communication. The kernel API is more primitive. In FreeBSD it's no glibc. And system libs aren't involved in networking. Kernel exposes POSIX-networking interface directly. So bug is somewhere in MySQL code. Will find out and make the patch. Regards, Yuri. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
running mysqld
Hello! I have a problem when I trying to start mysqld (as a root, under RH 7.2). Allegedly I don't have a rights to run this program... What I have to do to run mysqld without rebooting system? Best regards: Krzychu --- Super promocyjna oferta dla mieszkancow Krakowa http://www.promocja.kki.pl/radio.html --- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: InnoDB on FreeBSD-Alpha problem
Yuri, - Original Message - From: "Yuri" <[EMAIL PROTECTED]> To: "Heikki Tuuri" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, August 17, 2002 5:13 PM Subject: Re: InnoDB on FreeBSD-Alpha problem > Heikki, > > > I get the mysqld compiling/running > > > ok. DB dump is restored ok locally. > > > Locally everything wirks. But it > > > > what do you mean with this? If you issue SQL statements from the same > > computer, they work ok? > Exactly. If I connect via local UNIX socket all > happily works. > If I just connect via network it crashes right away. > > If this only happens in an incoming network connection, then probably > > your > > network library is buggy. In Compaq Alpha C and C++ variables have to > > be > > aligned to machine addresses divisible by 4 or 8, which is not required > > in > > Intel x86. Looks like some variable in the library is not aligned. > It's no such thing as "network library" in FreeBSD. It's > networking support in kernel. And it's perfectly ok. > Whole bunch of other apps work w/out any problems. > MySQL server app is crashing. > > It only started when I enabled InnoDB at compile time. > Before it was no such problem. > > So somewhere I guess they mangle with addresses and use > unaligned one. It happens on *network* level. So even > telnet connection on 3306 crashes it. Not even in logon phase. > Or early in logon phase. > > So it's a bug in MySQL somewhere. I will try to troubleshoot it > down to the source code line. if you can compile with the gcc -g option and run mysqld inside gdb, then you probably see in what function and line it crashes. If you just take a connection to mysqld, it does not execute InnoDB code at all. So the bug is probably in the network code of MySQL or the libraries involved, for example, glibc. I guess that libraries are always involved in network communication. The kernel API is more primitive. > Yuri. Regards, Heikki - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: InnoDB on FreeBSD-Alpha problem
Heikki, > > I get the mysqld compiling/running > > ok. DB dump is restored ok locally. > > Locally everything wirks. But it > > what do you mean with this? If you issue SQL statements from the same > computer, they work ok? Exactly. If I connect via local UNIX socket all happily works. If I just connect via network it crashes right away. > If this only happens in an incoming network connection, then probably > your > network library is buggy. In Compaq Alpha C and C++ variables have to > be > aligned to machine addresses divisible by 4 or 8, which is not required > in > Intel x86. Looks like some variable in the library is not aligned. It's no such thing as "network library" in FreeBSD. It's networking support in kernel. And it's perfectly ok. Whole bunch of other apps work w/out any problems. MySQL server app is crashing. It only started when I enabled InnoDB at compile time. Before it was no such problem. So somewhere I guess they mangle with addresses and use unaligned one. It happens on *network* level. So even telnet connection on 3306 crashes it. Not even in logon phase. Or early in logon phase. So it's a bug in MySQL somewhere. I will try to troubleshoot it down to the source code line. Yuri. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: generating random integer id
I wish to use mysql to do the rand id generation... Tom - Original Message - From: "David Lloyd" <[EMAIL PROTECTED]> To: "Tom Gao" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Saturday, August 17, 2002 11:59 PM Subject: Re: generating random integer id > > [ mysql, query ] > > > could someone point me to the right direction please > > Are you generating it in MySQL (using sql) or are you using a > programming language to do it? > > DSL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: generating random integer id
[ mysql, query ] > could someone point me to the right direction please Are you generating it in MySQL (using sql) or are you using a programming language to do it? DSL - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) 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: generating random integer id
hi guys, I'm trying to generate randomly a number as the primary key the key is to be an integer in mysql. So like auto_increment I can insert values and the pk can be generated automatically. could someone point me to the right direction please thanks Tom - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php