UDF writing to unix socket - segfaults?
I am writing a UDF for sending messages to a local daemon. I've been trying to make it use a UNIX socket, but it keeps segfaulting on connect() or sendto(). I have double and tripled checked everything, but I'm not finding anything. After a day or two, I finally decided to switch to UDP and writing to localhost instead, which works fine. I still feel writing to a UNIX socket ought to work and even if I've got a permission issue or similar, a segfault is not the appropriate handling. Any clues? -- Per Jessen, Zürich (16.5°C) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: UDF writing to unix socket - segfaults?
Martin Gainty wrote: assuming you worked out the access to network by your code permissions When I open the unix socket, I give it 0777. that means memory heap or stack is being overrun...you would be well advised to download the connect() and sendto() code from the OS vendor I'm running on Linux, so that is glibc - they work fine in a lot of other code. I find it hard to suspect those two. /Per -- Per Jessen, Zürich (23.0°C) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
RE: UDF writing to unix socket - segfaults?
Martin Gainty wrote: this is pure speculation unless we can get ahold of the source code for your specific version of glibc and determine what the maximum sizes are .. otherwise anything I suggest would be speculative..lets take a look at http://fossies.org/dox/glibc-2.16.0/sysdeps_2mach_2hurd_2sendto_8c_source.html ssize_t 29 __sendto (int fd, 30 const void *buf, 31 size_t n, 32 int flags, 33 const struct sockaddr_un *addr, 34 socklen_t addr_len) Here his maximum buffer length for sending is unsigned int specifically size_t so.. are both send and receive entities IPv4 or both entities are IPv6 if thats the case.. can you send 0 Bytes 2 bytes 4 bytes 8 bytes at what maximum length of buffer does the segfault occur ? Interesting that you should pick on the length - I think that might be it. When I switched to using a UDP socket, sendto() did complain about the length. (error 90, message too long). Hmm, that's probably a UDP packet-size restriction, whereas no such restriction exist for a unix socket (I presume). Thanks for the idea! -- Per Jessen, Zürich (24.4°C) -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql
Re: Facebook Trapped In MySQL a 'Fate Worse Than Death'
Daevid Vincent wrote: http://developers.slashdot.org/story/11/07/09/1256241/Facebook-Trapped-In-My SQL-a-Fate-Worse-Than-Death According to database pioneer Michael Stonebraker, Facebook is operating a huge, complex MySQL implementation equivalent to 'a fate worse than death,' and the only way out is 'bite the bullet and rewrite everything http://gigaom.com/cloud/facebook-trapped-in-mysql-fate-worse-than-death/ .' Not that it's necessarily Facebook's fault, though. Stonebraker says the social network's predicament is all too common among web startups that start small and grow to epic proportions. Fortunately those web startups that start small and grow to epic proportions are quite limited in numbers :-) /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
restrict mysql replication ?
I have a need to have a number of small tables (perhaps up to 1 rows each) replicated to a number of mysql slaves. Frequency of change is very low, and they need not be replicated within seconds, an hour is fine. The master server has a lot more and bigger tables, but each slave will only have a small subset of those. I've held off setting up proper replication, thinking it was too much effort, but I've now just yesterday set up one such replication. I've got the slave only replicating two tiny, mostly static tables, so I had kind of expected not to see a lot of network traffic. Instead I see lots and lots of replication traffic? I'm guessing the master notifies the slave(s) of all changes, not just changes to the replicated tables? Is there a way of limiting that? Alternatively, is there a way of doing replication-on-demand, perhaps triggered by cron? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: restrict mysql replication ?
Per Jessen wrote: Is there a way of limiting that? Alternatively, is there a way of doing replication-on-demand, perhaps triggered by cron? Ignore this, problem solved. I'll let the slaves query the master regularly and just reload the entire table. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: restrict mysql replication ?
Johan De Meersman wrote: On Wed, Dec 15, 2010 at 10:08 AM, Per Jessen p...@computer.org wrote: Per Jessen wrote: Is there a way of limiting that? Alternatively, is there a way of doing replication-on-demand, perhaps triggered by cron? Ignore this, problem solved. I'll let the slaves query the master regularly and just reload the entire table. That works. As for what you're seeing, you're probably limiting replication on the slave instead of limiting binlogging on the master. Yes, that sounds like what I'm doing. Can't quite recall the exact option, something like binlog-do-db I think. Thanks for the hint, might still come in useful. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Incorrect key file for table '/var/lib/mysql/.tmp/#sql_d57_2.MYI' ??
What does this error mean? mysql select ipaddr,reverse,count(distinct domain) from mxdata,domain group by ipaddr; ERROR 126 (HY000): Incorrect key file for table '/var/lib/mysql/.tmp/#sql_d57_2.MYI'; try to repair it /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Incorrect key file for table '/var/lib/mysql/.tmp/#sql_d57_2.MYI' ??
Per Jessen wrote: What does this error mean? mysql select ipaddr,reverse,count(distinct domain) from mxdata,domain group by ipaddr; ERROR 126 (HY000): Incorrect key file for table '/var/lib/mysql/.tmp/#sql_d57_2.MYI'; try to repair it Please ignore. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Raid level suggestions for mysql-server
Götz Reinicke - IT Koordinator wrote: Hi, soon I'll get a SUN X4170 with 8*2,5 SAS 300 GB harddisks. (24 GB RAM) This system could be our new central mysql-server for some LAMP-systems. (right now about 50 GB mysql data total, roughly 60-70% reads.) What would be a good raid-Layout for the server? I was thinking of one large 1+0 or 0+1 as 1.2TB would be more than enought. Or may be I do split things up like this: one raid 1 for the system, one raid 1 for logfiles, one raid 1+0/0+1 for the database. Any suggestions? I have a very similar HP box with 8 drives too - I've got it running one RAID1 (2x72Gb) for system and one RAID6 (6x146Gb) for data. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: upgrade 5.0.51 to 5.1.36 - TRUNCATE/DROP on temp table?
Per Jessen wrote: mysql list, after my upgrade to 5.1.36 I hit this odd little problem: I have an application which does roughly this: CREATE TEMP TABLE new LIKE old; populate 'new'. do some stuff TRUNCATE new; populate again This has always worked fine, but after the upgrade it failed because the user does not have DROP authority on 'new'. Can anyone explain to me what causes this change in behaviour? For the time being I've changed the TRUNCATE to a DELETE. I get to answer that one myself - from the manual: Beginning with MySQL 5.1.16, the DROP privilege is required for TRUNCATE TABLE (before that, TRUNCATE TABLE requires the DELETE privilege). /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Upgrading from 5.0.32 via a replication chain and bug 24432
David Harrison wrote: Hi all, I've got a quite large database (23G) that is running on a 5.0.32 version of MySQL. I really want to upgrade out of 5.0.32 to the latest version of 5.1 (or even 5.4) but a straight mysql_upgrade of the database takes long enough that I'd have serious down-time issues (last time I benchmarked the upgrade it came in at over day). This may or may not be useful, but I've just upgraded from 5.0.51 to 5.1.36, which took about 6 hours using mysqldump+reload - the database is about 20Gb. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
upgrade from 5.0.51 to 5.1.36 - unexpected new databases?
mysql list, this weekend I upgraded my 5.0.51 installation to 5.1.36, which seems to have gone without a hitch - except the following weird messages: Failed to ALTER DATABASE `#mysql50#.protected` UPGRADE DATA DIRECTORY NAME Error: Table 'mysql.event' doesn't exist Failed to ALTER DATABASE `#mysql50#.tmp` UPGRADE DATA DIRECTORY NAME Error: Table 'mysql.event' doesn't exist I've now also got two databases named '.protected' and '.tmp'. Does anyone what might have happened? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
upgrade 5.0.51 to 5.1.36 - TRUNCATE/DROP on temp table?
mysql list, after my upgrade to 5.1.36 I hit this odd little problem: I have an application which does roughly this: CREATE TEMP TABLE new LIKE old; populate 'new'. do some stuff TRUNCATE new; populate again This has always worked fine, but after the upgrade it failed because the user does not have DROP authority on 'new'. Can anyone explain to me what causes this change in behaviour? For the time being I've changed the TRUNCATE to a DELETE. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: a better way, code technique?
AndrewJames wrote: is there a better way (hopefully simpler) to code this? i want to get the user id of the logged in user to use in my next statement. $q1 = sprintf(SELECT uid FROM users WHERE users.username='$username'); The only improvement I can see is: $q1 = sprintf(SELECT uid FROM users WHERE users.username='%s', $username); /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Where does mysqld write a core file?
I've been trying to make mysqld write a coredump following a crash, and this morning I finally succeeded - according to mysqld.log anyway. It clearly says Writing a core file - but where to? I've checked the datadir /var/lib/mysql, whereelse might it be? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: ignore accents in order by
PJ wrote: Let me put it this way, I am not having the problem. The problem seems to be withthe way that character encoding is set up on the internet - as confused and inconsistent as most everything else. You can put whatever charset you want in the header, in the collations in your database, your htmls... you see already that the options start to multiply rapidly... You're making it more complicated than it is. Just stick to UTF8 and you'll be fine. without even considering the browsers. So, I have tried about all combinations possible and there is no one way to implement display and use of accents. Sure there is. UTF-8. Period. UTF-8 does not handle them very well at all; iso-8895-1 doesn't either; you can set the coding on your browser to whatever you want - when you update or reload the file the little black diamond devils come back or turn into little blank squares on IE8... I think we've gone OT here, but honestly I have no problem with accents nor any other special characters anywhere - database, browser, whereever. And yes, I work with 4-5 different languages on a daily basis. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Per Jessen wrote: It happened agaIn this morning, but slightly different: [snip] thd=0x7fe0140c7e00 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Cannot determine thread, fp=0xb, backtrace may not be correct. Bogus stack limit or frame pointer, fp=0xb, stack_bottom=0x4514, thread_stack=262144, aborting backtrace. Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd-query at 0x1355140 = INSERT IGNORE INTO quarantine_archive SELECT * FROM quarantine WHERE state=1 AND domain='example.com' thd-thread_id=1493537 The context is the same as previously, except the query: INSERT IGNORE INTO quarantine_archive SELECT * FROM quarantine WHERE state=1 AND domain='example.com' This is not exactly reproducable, but it is fairly predictable - happens every morning towards 0600 - I have an archive job starting at 0500. For the last three days, the query has been roughly the same, except the 'example.com' varies. Is there nothing I can do to attempt to diagnose crashes such as this? Still no suggestions? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Per Jessen wrote: I have just discovered that my mysql server was restarted this morning, which is what gave me the 2013. In the log I found this: [snip] It happened agaIn this morning, but slightly different: [snip] thd=0x7fe0140c7e00 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Cannot determine thread, fp=0xb, backtrace may not be correct. Bogus stack limit or frame pointer, fp=0xb, stack_bottom=0x4514, thread_stack=262144, aborting backtrace. Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd-query at 0x1355140 = INSERT IGNORE INTO quarantine_archive SELECT * FROM quarantine WHERE state=1 AND domain='example.com' thd-thread_id=1493537 The context is the same as previously, except the query: INSERT IGNORE INTO quarantine_archive SELECT * FROM quarantine WHERE state=1 AND domain='example.com' It's getting to be a bit annoying - not all our apps were written to be able to handle the database connection disappearing at any time. Yes, they should have been, but it is a pretty unusual situation after all. Is there nothing I can do to attempt to diagnose crashes such as this? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
mysql error 2013 Lost connection to MySQL server during query
This weekend we completed migrating a large(ish) mysql server from 5.0.26 on 32bit to 5.0.51a on 64bit. Everything went relatively smoothly, until this morning when I noticed an application had choked on getting Error 2013 Lost connection to MySQL server during query. The application is running remotely on 32bit using mysql library from version 5.0.67. I've been googling quite a bit, but haven't really found anything of any use. I've checked the two configurations, and they are the same. Can anyone help point me in the right direction? Thanks. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Per Jessen wrote: This weekend we completed migrating a large(ish) mysql server from 5.0.26 on 32bit to 5.0.51a on 64bit. Everything went relatively smoothly, until this morning when I noticed an application had choked on getting Error 2013 Lost connection to MySQL server during query. I have just discovered that my mysql server was restarted this morning, which is what gave me the 2013. In the log I found this: 090525 6:04:35 - mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=6442450944 read_buffer_size=258048 max_used_connections=43 max_connections=100 threads_connected=26 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 6367855 Kbytes of memory Hope that's ok; if not, decrease some variables in the equation. thd=0x7fa6fc0173e0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... Cannot determine thread, fp=0xb, backtrace may not be correct. Bogus stack limit or frame pointer, fp=0xb, stack_bottom=0x41a6, thread_stack=262144, aborting backtrace. Trying to get some variables. Some pointers may be invalid and cause the dump to abort... thd-query at 0x1340aa0 = SELECT domain,domain FROM dodgy_domain,spamdns_ipaddr WHERE dodgy_domain.ipaddr=spamdns_ipaddr.ipaddr group by domain having min(first)='2009-05-25 00:00:00' thd-thread_id=434983 /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Michael Dykman wrote: It might be helpful if you could tell us how you affected your data migration Sorry, I'm not familiar with reporting problems in/on mysql. The data migration was done with a full database dump (mysqldump) from the 32bit system, then a reload on the new 64bit system. I think it took 6-8 hours. and what kind of job was running at the time it went down. The job executing the SQL mentioned in the log ran on another server. It is a SELECT running from the command line (in a Makefile). I'm not sure what else to tell you. Having the server go away mid-query generally does mean you have run into a bug of some sort but, more often than not, you were doing something ill-advised at the time. The setup has been running for at least two years with no such problems. Let me know what other info would be interesting. best regards Per Jessen -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Michael Steinfeld wrote: just a thought: Did you run mysql_upgrade after the import? No, I didn't - I didn't think of it as I really only moved the data across. best regards Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Per Jessen wrote: Michael Steinfeld wrote: just a thought: Did you run mysql_upgrade after the import? No, I didn't - I didn't think of it as I really only moved the data across. Okay, have done a mysqlcheck --check-upgrade - came back all clean. I don't see a need to run mysql_fix_privilege as I manually copied the necessary privilege data. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Michael Dykman wrote: Have you tried running the offending SQL manually against you new installation? Does it come back clean in the isolated case? No, not manually, but the job/the SQL is run several times a day, maybe 2-3 times per hour. Is there anything else which runs against this database at night? crons? Yes, lots of stuff. Cron-jobs, jobs submitted by daemons, etc. Could you post the script that you are running to give some context to the statement which winds up in your error log? I'm generating a zonefile for rbldnsd with entries from my table since midnight. Entries from before midnight are put in a main-table, entries after are in this regular diff. The statement is this: SELECT domain,domain FROM dodgy_domain,spamdns_ipaddr WHERE dodgy_domain.ipaddr=spamdns_ipaddr.ipaddr group by domain having min(first)='midnight' Tonight it will be changed to: (single domain, not domain,domain) SELECT domain FROM dodgy_domain,spamdns_ipaddr WHERE dodgy_domain.ipaddr=spamdns_ipaddr.ipaddr group by domain having min(first)='midnight' Additional context: The server is brandnew, an HP Proliant with dual quad-core Xeons and 10Gb RAM. The filesystem is JFS on hardware RAID6. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Per Jessen wrote: Michael Dykman wrote: Have you tried running the offending SQL manually against you new installation? Does it come back clean in the isolated case? No, not manually, but the job/the SQL is run several times a day, maybe 2-3 times per hour. I've also just run the query manually a couple of times, no problems. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Michael Dykman wrote: Given the new hardware, I'm now suspecting the RAID controller. I have seen misconfigured RAIDs or bad RAID drivers take out a server in just such a manner. I had a debian server connected to an EMC SAN.. As debian isn't supported, we had this open-source driver which gave us no end of problems. If a logical drive acts up or does something unexpected, MySQL could react to that in a manner consistent with what you are seeing in your log. Shouldn't/wouldn't the filesystem complain first? There is a lot of activity on the filesystem, mysql is just a tiny part of it. I would be tempted to put the hardware through a stress test. I know that's not much help. I really have no reason to suspect the hardware. It's new, but it's been running in burn-in mode for about a month (although not with much load, mostly idling). I might as well suspect the mysql build and try upgrading to a newer one. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: mysql error 2013 Lost connection to MySQL server during query
Darryle Steplight wrote: Hi Per, Maybe you need to beef up your CONNECT_TIMEOUT setting in your .my.cnf file. Are these queries appearing in your slow query logs?What is your LOG_QUERY_TIMES set too? Here are some other settings you may want to play around wtih CONNECT_TIMEOUT INTERACTIVE_TIMEOUT WAIT_TIMEOUT NET_WRITE_TIMEOUT NET_READ_TIMEOUT MAX_CONNECT_ERRORS Hi Darryle I did notice references to some of those when I was googling, but because I didn't change any settings in my migration except up the key_buffer space, I didn't really pay much attention. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: WL#946 and Changing time literal format
Michael Widenius wrote: Bernt We have a Norwgeian word for this helpfullness: bjørnetjeneste, but Bernt I'm not sure what the english idiom would be. A disservice. In German Bärendienst. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/mysql?unsub=arch...@jab.org
Re: Vexing permissions issue with partitioned CREATE TABLE
Brad Heintz wrote: Thanks for responding. The CREATE TABLE docs for 5.1 say that DATA DIRECTORY and INDEX DIRECTORY take absolute paths (not relative), and will in fact reject paths containing the MySQL data dir. Because I'm out of other ideas, I did try creating the directories under the MySQL data dir and it doesn't change the error, so it has nothing to do with MySQL secretly expecting relative paths. I have created the directories by hand, and as I said in my original email, I've tried chown'ing them to the MySQL user. No change in outcome. If you're running SElinux or AppArmor, check the audit logs, e.g. /var/log/audit/audit.log /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: freeware tools for repairing myisam tables
John Meyer wrote: I'm trying to help out a friend with repairing myisam tables. Does anybody know the best freeware solutions if CHECK TABLE and REPAIR TABLE don't do the job? Did you try myisamchk ? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: MySQL using only 1 CPU
Eber Duarte wrote: I noticed that I always have 2 processes runing on Linux doesn't matter the amount of concurrent connections that is running on MySQL. Due to that, MySQL is using only 1 CPU instead of using 8 CPUs that exist on this machine: Do you have enough concurrent load to occupy 8 CPUs? Here's a sample 'top' from one of my machines (also 8-way): top - 18:12:58 up 12 days, 23:22, 6 users, load average: 2.95, 3.02, 3.53 Tasks: 177 total, 1 running, 175 sleeping, 0 stopped, 1 zombie Cpu0 : 45.1%us, 13.2%sy, 0.0%ni, 41.4%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st Cpu1 : 19.0%us, 13.8%sy, 0.0%ni, 67.2%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu2 : 23.9%us, 12.7%sy, 0.0%ni, 63.4%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu3 : 32.1%us, 11.1%sy, 0.0%ni, 56.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu4 : 38.0%us, 9.5%sy, 0.0%ni, 52.5%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu5 : 98.4%us, 1.6%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu6 : 73.9%us, 16.3%sy, 0.0%ni, 9.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Cpu7 : 36.7%us, 13.4%sy, 0.0%ni, 49.8%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 5195036k total, 4960136k used, 234900k free,8k buffers Swap: 4200956k total, 244k used, 4200712k free, 3469996k cached PID USER PR NI VIRT RES SHR S %CPU %MEMTIME+ COMMAND 4575 mysql 16 0 1152m 1.0g 4792 S 249 21.0 18269:15 mysqld 16720 root 25 0 000 Z5 0.0 0:00.15 make defunct /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: RE: what is the proper way to store timezone information?
Boyd, Todd M. wrote: My concern is whether the time_zone_id is a fixed reference of the timezone. If the id might (for whatever reason) change in the future, I'd have to store the timezone name. http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html You can convert back and forth using the system's time zone table. Read the MySQL manual I've linked to above for more information. I am using just that, and I have also read the manual on the subject, but nonetheless I have to store the time-zone identifier somewhere and in some form. Apparently, you can even reference them by offset from UTC (i.e., -6:00 for US Central). The article warns against using the time zone's text description, but I saw nothing about dangers of offsets or time_zone_id. Yeah, in fact that article doesn't even mention the time_zone_id, which is why I'm hesitant using it as a definite reference to a time zone. I'd prefer not to use offset, as I would loose the little bit of geographical info then. ('Europe/Zurich' has the same offset as 'Europe/Copenhagen'). For now I'm storing the name of the timezone, but the manual is clearly lacking some info in this respect. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: what is the proper way to store timezone information?
Boyd, Todd M. wrote: When recording this information, do I store the full name or just the 'time_zone_id' which is present in mysql.time_zone_name ? This is entirely a matter of choice. It's like asking if you should store formatting when you insert phone numbers into a database--is it easier for you to parse back if you do so? If yes, then store the formatting. If no/probably not/I don't need to parse it, then just store it without. My concern is whether the time_zone_id is a fixed reference of the timezone. If the id might (for whatever reason) change in the future, I'd have to store the timezone name. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
what is the proper way to store timezone information?
All, I will be recording timezone information based on user input using the time zone names from mysql.time_zone_name - names like 'America/Los_Angeles'. When recording this information, do I store the full name or just the 'time_zone_id' which is present in mysql.time_zone_name ? thanks Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Performance problem - MySQL at 99.9% CPU
Gunnar R. wrote: I am thinking about buying a new dual core box (with IDE disks?), but I have to make sure this really is a hardware issue before I spend thousands of bucks. I think you've got an application problem somewhere which you should look into first. Hardware-wise I think you're doing fine, except you could probably increase overall performance with more memory. MySQL is pretty good at query-caching. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
developing for different mysqlclient target libraries?
All, how do I go about building a binary on my workstation with e.g. libmysqlclient.15 such that same binary can also be deployed on a production machine with libmysqlclient.14 )or lower) ? Do I need to have the lower-level mysqlclient library available on my development workstations? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: Linux vs. Windows?
Pat Adams wrote: Even though Linux more or less acts like its big UNIX cousins, the nitty gritty details of system administration, security, and patching are much difference. Ah, not really. In the *nix world, I first encountered Linux, then HPUX, then AIX, then Linux again, then Solaris. A sysadmin worth his pay won't have problem working any of them. /Per Jessen, Zürich -- http://www.spamchek.com/freetrial - managed anti-spam and anti-virus solution. Sign up for your free 30-day trial now! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
authentication - which hostname is used?
Hi, when an IP-address is reverse mapped to multiple names, which one is used by mysql for user authentication? Right now (4.1.11) it looks like the first record is used, which I'm not sure good enough. Shouldn't mysql check all the returned names and see if one of them authenticates? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Storing huge amount of binary data
Cabbar Duzayak wrote: So my questions are: 1. The main question is, do you guys have any experience with this much binary and regular data? Do you think Mysql can handle this much data in a reliable manner (without corrupting data and/or degrading/terrible performance) ? I would say so, yes. One of my biggest databases holds 50-60million rows, and takes up about 5Gb diskspace. I don't think mysql will have any problems running what you describe. 2. Can I implement this using regular SCSI disks with regular mysql? Or do I have need advanced solutions such as clustered, replicated, etc? Clustering and replication is more to do with data-availability. You'll probably benefit from using RAID in some form - depends on whether you need reliability or speed. 3. Again, as you can understand, I want to minimize the cost here. If you don't think I can use mysql, do you think Microsoft SQL server is good enough for this task? I don't think so, no. /Per Jessen, Zürich -- http://www.spamchek.com/freetrial - managed anti-spam and anti-virus solution. Sign up for your free 30-day trial now! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
altering pointer size reveals unexpected result
I ran into a table full situation a couple of days ago, but didn't spot it till last night. I read the advice about altering the pointer-size: http://dev.mysql.com/doc/mysql/en/full-table.html but I neglected to read Jason Collisons comment about backing up my data first. I lost about 50mill records too ... It's not a major disaster, but I'd like to know if it is intended behaviour? /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: altering pointer size reveals unexpected result
Gleb Paharenko wrote: Hello. Your situation looks very rare. I didn't found complains in bug database and archives. If you are able to reproduce this situation the bug report would be helpful. Yeah, well - first I'd need to reproduce the 50mill records :-) This will take maybe a month, but I'll try to provoke the situation again. Hmm, or I guess I could just fill it up with random records. Let me have a look. /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
allow-subscribe not working on mysql list?
Hi, I've recently subscribed using the allow-subscribe method as described here: Posting from an alternative address when post are allowed only to subscribers.: http://www.ezmlm.org/ezman/ezman1.html But I'm still getting posts to the mysql lists on this address?? ezmlm did not complain when I set it up earlier this morning. /Per Jessen, Zurich -- http://www.spamchek.ch/freetrial - managed anti-spam and anti-virus solution. Lassen Sie sich überzeugen - 30 Tage Kostenlos! -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: recovery question
Gleb Paharenko wrote: Hello. REPAIR TABLE ... USE_FRM helps in difficult cases. See: http://dev.mysql.com/doc/mysql/en/repair-table.html Thanks Gleb. I'd forgotten about that option. To others who try the same thing - make sure you have enough space in your TMPDIR or set TMPDIR/--tmpdir to a place where you have sufficient space. I started the REPAIR, which ran for a while, then stopped and appeared to be idling. It took me a few hours before I checked the mysqld.log and found out that it had run out of space in /tmp and was waiting for some to be cleared up. -- /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
recovery question
All, I've got a table with about 25mill rows that was victim of a crash recently. (power-failure). I've been trying to recover it, but I'm not making much progress. From the most recent attempts: myisamchk --safe-recover --force table - recovering (with keycache) MyISAM-table 'table' Data records: 21622679 4988000 7256000 10627000 myisamchk: error: 126 for record at pos 1589881104 MyISAM-table 'table' is not fixed because of errors myisamchk -r --force --tmpdir=/data2/tmp table - recovering (with sort) MyISAM-table 'table' Data records: 12876899 - Fixing index 1 - Fixing index 2 - Fixing index 3 Key 3 - Found wrong stored record at 0 MyISAM-table 'table' is not fixed because of errors Where do I go from here? I've got a backup of the table, but I'm not sure what sort of state it is in. -- /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: recovery question
Per Jessen wrote: I've got a backup of the table, but I'm not sure what sort of state it is in. Correction - no backup is available. This table has got to be recoverable. -- /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: Wide eyes
Critters wrote: Is a table with say 5,000,000+ records possible? Certainly. I've got some sideline app that's currently working it's way through about 15mill rows. I think it takes up about 3Gb diskspace for the moment. What are the things to look out for with this amount of data? Not much - good indexes and prooper querying. Could the database be split over several database servers? Possibly, but I don't see a need. -- /Per Jessen, Zürich -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SELECT COUNT
Hi, I am in the process of running ecperf using mysql, and ran into a small problem regarding SELECT COUNT - usd in some of the ecperf source. Apparently, SELECT COUNT (*) FROM is not valid syntax according to mysql ? where as SELECT COUNT(*) FROM is ? What's with this blank between COUNT and ( ? thanks, Per Jessen, Zurich - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: SELECT COUNT
-Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 2:11 PM [snip] Apparently, SELECT COUNT (*) FROM is not valid syntax according to mysql ? where as SELECT COUNT(*) FROM is ? [/snip] call and the opening parentheses. I know that ANSI-92 SQL and ANSI-99 SQL do not have this requirement, but I think that the MySQL folks may have looked closely at other programming languages and found that function names are almost immediately followed by the opening parentheses (is one just a parenthesi? :) ). Is this a problem? Not any longer - the first reply (use --ansi) solved the problem - thanks. rgds, Per Jessen, Zurich - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php