 |
| Recent blog posts: | |
 |
| Forums: | | |
 |
| Discuss: | |
 |
| Recent forum topics: | |
 |
| Recent forum comments: | |
 |
| Модератор: | |
 |
Saturday, 20 January 2007
|
| max_allowed_packet Jacob Devore 00:37:08 |
| | I found out that any version before 4.0.1 doesn't allow any packets larger than 16M Which sucks because I'm definately going to have data chunks larger than that. So I am going to upgrade to 4.0.1. Curious as to how stable it is? Also, how stable is the myodbc 3.51?
Thanks,
jake
--------------------------------------------------------------------- Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before posting. To request this thread, e-mail myodbc-thread5777@lists.mysql.com
To unsubscribe, send a message to the address shown in the List-Unsubscribe header of this message. If you cannot see it, e-mail myodbc-unsubscribe@lists.mysql.com instead.
|
| | 12 answers | Add comment |
Friday, 19 January 2007
|
| Streaming LOB Data Robert DiFalco 22:43:46 |
| | It appears (for InnoDB at least) that while INSERTing a LOB that all LOB data must be loaded into memory before it is written to disk. Or is it just the size of the combined log files? Looking at Task Manager, it looks like it DOES try to load the whole thing into memory before streaming it to disk; which just seems wacky.
The error I get is this:
"Out of memory (Needed xxx ..."
If the server crashes I get this:
InnoDB: which exceeds the log group capacity 18870682. InnoDB: If you are using big BLOB or TEXT rows, you must set the InnoDB: combined size of log files at least 10 times bigger than the InnoDB: largest such row. 060427 15:26:53 InnoDB: Error: cannot allocate 539001144 bytes of InnoDB: memory with malloc! Total allocated memory InnoDB: by InnoDB 52823786 bytes. Operating system errno: 8 InnoDB: Check if you should increase the swap file or InnoDB: ulimits of your operating system. InnoDB: On FreeBSD check you have compiled the OS with InnoDB: a big enough maximum process size. InnoDB: Note that in most 32-bit computers the process InnoDB: memory space is limited to 2 GB or 4 GB.
How can I make the size of LOBs I insert NOT be memory constrained?
R.
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 8 answers | Add comment |
|
| Fwd: Re: MySQL 5.0.x and 5.1.x Compiling options and settings on Linux IA64: one more question: ./bi Mariella Petrini 20:55:36 |
| | Hi, After having compiled (debug and optimized version) of MySQL 5.1.14 on Itanium-2 using icc, I have run mysql_install_db --user=........... and started mysqld_safe in both scenarios (debug and optimized). In both cases mysqld starts without any errors. Unfortunaly when running the optimized version of mysqld I am not able to connect and set the root password. ./bin/mysqladmin -u root password '***********' ./bin/mysqladmin: connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: NO)' The same procedure applied on the mysqld compiled with debug version (--with-debug) has no problem and I am able to set up the root password without any problems. Is there a bug in the MySQL 5.1.14 version when not compiled with --with-debug or am I missing something ? P.S. I have also tried to set the root password using the debug version, shut-down the mysqld debug, replaced the "mysql" subdirectory in the data subdir in the optimized version and restarted the optimized mysqld with the new mysql subdir in the data subdir, but I got the same error. Could you please help ? Thanks in advance for your help, Mariella
--------------------------------- Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers. |
| | 1 answer | Add comment |
|
| Re: [OT} How to pronounce GIF Gerald L. Clark 19:28:26 |
| | Brian Dunning wrote:> On Jan 7, 2007, at 4:23 PM, TK wrote:>
In short, the original inventors of the GIF format (CompuServe, 1987) >> have always defined the pronunciation to be like "JIF." So, that has >> always been the "correct" pronunciation.> Sure, so I'll start pronouncing "graphics" as "jraphics".> How do you pronounce "giraffe"?
-- Gerald L. Clark Supplier Systems Corporation
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 3 answer | Add comment |
|
| ASP.NET Access to MySQL BIT field????-Help Jesse 15:05:47 |
| | OK. I don't recall having a problem with this before, but, how do I assign a variable to a MySQL Bit field? I'm trying to set up a CheckBox that is on my form, and I've tried variations of the following:
FirstTime.Checked = CBool(RS("FirstTime")) FirstTime.Checked = CBool(RS("FirstTime").ToString) FirstTime.Checked = RS("FirstTime") FirstTime.Checked = Convert.ToBoolean(RS("FirstTime"))
I believe that all of them give the error, "String was not recognized as a valid Boolean". When I view the field value in SQL Manager 2005 Lite, It presents a check box for the field value. When I view it through the MySQL Query Browser, it presents the value as b'1'
Any hints? I'm sure this is a basic issue, but I just can't seem to find a way to do it.
Thanks, Jesse
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 1 answer | Add comment |
|
| The Polish localization of MySQL Administrator Adam Derda 10:58:19 |
| | Hi,
About 8 months ago I prepared the Polish localization of MySQL Query Browser. After this "short" break I have prepared the Polish localization of MySQL Administrator 1.2. Who should I send the translated files, to make the localization a part of the standard distribution?
Best regards, Adam
-- MySQL GUI Tools Mailing List For list archives: http://lists.mysql.com/gui-tools To unsubscribe: http://lists.mysql.com/gui-tools?unsub=gcdmm-mycc@m.gmane.org
|
| | 1 answer | Add comment |
|
| FW: [PART 2/2] InnoDB - Different EXPLAINs for same query John Anderson 00:39:11 |
| | I optimized every table after I first imported the data. The tables were probably in use, off and on for testing, for about a week after the optimize table was ran on every table before I noticed this problem. I'm not saying the problem didn't exist within that week, I'm just saying I didn't notice it ;) .
Another thing. Does the query optimizer keep any sort of statistics and use them to make decisions for future queries on the same table? If so, then that could be the problem because we have certain fields, containing only numbers, but were previously setup as varchars for some unknown reason. I changed them all to int types but some queries in obscure parts of our applications are still querying this field as if it were a character field, using LIKE, etc. I'm slowly but sure tracking those down and fixing them, I'm just curious if that could have anything to do with this strange behavior.
Thanks,
John A.
-----Original Message-----> From: William R. Mussatto [mailto:mussatto@csz.com]> Sent: Wednesday, January 17, 2007 5:17 PM> To: mysql@lists.mysql.com> Subject: Re: [PART 2/2] InnoDB - Different EXPLAINs for same query> Just a thought, did you try running Optimize Table from the MySQL> Administrator. I'm thinking that when you restarted it re-examined table statistics and was able to pick a better index.> On Wed, January 17, 2007 14:31, John Anderson said:>> mysql> SELECT SQL_NO_CACHE COUNT(rb.subscription_id) as>> recurring_cc_count,>> -> SUM(rb.grace_price) as recurring_cc,>> -> COUNT(sb.subscription_id) as single_cc_count,>> -> SUM(sb.initial_amt) as single_cc>> -> FROM customerdetail a>> -> LEFT JOIN recurringbilling rb>> -> ON a.subscription_id = rb.subscription_id>> -> LEFT JOIN singlebilling sb>> -> ON a.subscription_id = sb.subscription_id>> -> LEFT JOIN (global.subscriptionExchangeRate as ser INNER JOIN>> global.currencyCodes as cur)>> -> ON (a.subscription_id = ser.subscriptionId AND>> ser.billedCurrencyCode = cur.currencyCode)>> -> WHERE client_accnum = '12345'>> -> AND a.trans_timestamp>> -> BETWEEN '20070108000000' AND '20070108235959';>> +--------------------+--------------+-----------------+-----------+>> | recurring_cc_count | recurring_cc | single_cc_count | single_cc |>> +--------------------+--------------+-----------------+-----------+>> | 4 | 119.80 | 0 | NULL |>> +--------------------+--------------+-----------------+-----------+>> 1 row in set (0.40 sec)>> mysql> explain SELECT SQL_NO_CACHE COUNT(rb.subscription_id) as>> recurring_cc_count,>> -> SUM(rb.grace_price) as recurring_cc,>> -> COUNT(sb.subscription_id) as single_cc_count,>> -> SUM(sb.initial_amt) as single_cc>> -> FROM customerdetail a>> -> LEFT JOIN recurringbilling rb>> -> ON a.subscription_id = rb.subscription_id>> -> LEFT JOIN singlebilling sb>> -> ON a.subscription_id = sb.subscription_id>> -> LEFT JOIN (global.subscriptionExchangeRate as ser INNER JOIN>> global.currencyCodes as cur)>> -> ON (a.subscription_id = ser.subscriptionId AND>> ser.billedCurrencyCode = cur.currencyCode)>> -> WHERE client_accnum = '12345'>> -> AND a.trans_timestamp>> -> BETWEEN '20070108000000' AND '20070108235959';>> +----+-------------+-------+--------+----------------------------------->> -----------------------------+-----------------+---------+-------------->> -----------------+------+--------------------------+>>
| id | select_type | table | type | possible_keys>> | key | key_len | ref | rows |>> Extra |>> +----+-------------+-------+--------+----------------------------------->> -----------------------------+-----------------+---------+-------------->> -----------------+------+--------------------------+>>
| 1 | SIMPLE | a | range |>> client_idx,trans_idx,accno_trans_idx,accnumactive,accsubactive |>> accno_trans_idx | 7 | NULL | 4 |> Using>> where; Using index |>> | 1 | SIMPLE | rb | eq_ref | PRIMARY>> | PRIMARY | 8 | company.a.subscription_id | 1 |>> |>> | 1 | SIMPLE | sb | eq_ref | PRIMARY>> | PRIMARY | 8 | company.a.subscription_id | 1 |>> |>> | 1 | SIMPLE | ser | ref | PRIMARY,billedCurrencyCode>> | PRIMARY | 8 | company.a.subscription_id | 1 |>> |>> | 1 | SIMPLE | cur | eq_ref | PRIMARY>> | PRIMARY | 2 | global.ser.billedCurrencyCode | 1 |>> Using index |>> +----+-------------+-------+--------+----------------------------------->> -----------------------------+-----------------+---------+-------------->> -----------------+------+--------------------------+>>
5 rows in set (0.00 sec)>> mysql> show index from customerdetail;>> +----------------+------------+-----------------+--------------+-------->> ---------+-----------+-------------+----------+--------+------+--------->> ---+--------->>
| Table | Non_unique | Key_name | Seq_in_index |>> Column_name | Collation | Cardinality | Sub_part | Packed | Null |>> Index_type | Comment>> +----------------+------------+-----------------+--------------+-------->> ---------+-----------+-------------+----------+--------+------+--------->> ---+--------->> ..........................SNIP........................................>>
| customerdetail | 1 | accno_trans_idx | 1 |>> client_accnum | A | 17052 | NULL | NULL | |>> BTREE |>>
| customerdetail | 1 | accno_trans_idx | 2 |>> trans_timestamp | A | 49042196 | NULL | NULL | |>> BTREE |>> ..........................SNIP........................................>> +----------------+------------+-----------------+--------------+-------->> ---------+-----------+-------------+----------+--------+------+--------->> ---+---------+>>
The query executes orders of magnitude faster, and the EXPLAIN shows>> why. MySQL has now chosen to use the accno_trans_idx index for the>> customerdetail table which has much better cardinality (almost 1 key> per>> row).>> The obvious workaround is use FORCE INDE  accno_trans_idx) in the> query>> for now, but I'm beginning to think this may be a bug. Has anyone> else>> had any similar issues? I haven't found anything like this in the database though. If anyone doesn't see anything blatantly wrong with> my>> setup, I'll submit this as a bug.>> Here is how MySQL is configured, and the my.cnf I'm using.>> CC="gcc -m64" CXX="g++ -m64" \>> ./configure --prefix=/usr \>> --libexecdir=/usr/sbin \>> --infodir=/usr/share/man \>> --mandir=/usr/share/info \>> --enable-thread-safe-client \>> --enable-local-infile \>> --with-extra-charsets=all \>> --with-unix-socket-path=/tmp/mysql.sock \>> --with-mysqld-user=mysql \>> --with-archive-storage-engine \>> --with-csv-storage-engine \>> --with-blackhole-storage-engine \>> --with-federated-storage-engine \>> --with-berkeley-includes=/usr/include \>> --with-berkeley-libs=/usr/lib64 \>> --without-extra-tools \>> --with-mysqlmanager=no \>> ---------------------->> socket=/tmp/mysql.sock>> log-error=/var/log/mysql/mysql.log>> pid-file=/var/run/mysqld/mysqld.pid>> #log-bin>> replicate-ignore-db=mysql>> max_allowed_packet=1024M>> open_files_limit=8192 # Anything higher needs corresponding ulimit> entry>> max_heap_table_size=1024M>> myisam_sort_buffer_size=256M>> innodb-table-locks=off>> transaction_isolation=REPEATABLE-READ>> innodb_buffer_pool_size=1024M>> innodb_log_buffer_size=8M>> innodb_flush_log_at_trx_commit=0>> innodb_log_file_size=128M>> innodb_additional_mem_pool_size=32M>> innodb_thread_concurrency=16>> innodb_commit_concurrency=4>> innodb_flush_method=O_DIRECT>> innodb_open_files=8192>> innodb_sync_spin_loops=32>> innodb_thread_sleep_delay=1000>> innodb_autoextend_increment=1024M>> innodb_file_per_table=TRUE>> socket=/tmp/mysql.sock>> -------> William R. Mussatto, Senior Systems Engineer> http://www.csz.com> Ph. 909-920-9154 ext. 27> FAX. 909-608-7061> http://lists.mysql.com/mysql?unsub=johnha@ccbill.com>
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | Add comment |
|
| Connecting from a remote computer Kay C. Tien 00:39:11 |
| | Hi All,
This is a dump and simple question but I can't seem to get it to work. How do I enable a user to be able to connect from a remost host using MySQL Administrator? I added "%" but once signed in, I still can't access the user panel in the administrator.
Thanks. Kay
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 4 answer | Add comment |
|
| Using NULL with template queries Roger Urscheler 00:01:40 |
| | I am using template queries and want to set a string parameter to NULL. How do I do that?
This does not work: query.def["col1"] = mysqlpp::null; query.def["col1"] = NULL;
Thanks, Roger
|
| | 1 answer | Add comment |
|
| optimizing a query Randy Burke 00:01:34 |
| | I know this is not really a Perl question, Except that I use perl yo generate the page.
I have a report that is displayed on a webpage in an 10 x 9 table
Originally we did it as one query per cell, then we combined it into one monolithic query that returns one row with 72 columns
I am sure that there is some way to optimize this, maybe using sub-query, which I have not been able to grasp yet.
so here is the beast:
my ($newdata, $noanswerdata, $timeddata, $misseddata, $highdata, $normaldata, $lowdata, $monitordata);
# Open DB my $dbh = DBI->connect( "dbi datasrc", "$sqluser", "$sqlpassword") || error("Unable to open user database: $DBI::errstr");
# Setup the Query my $query = qq{SELECT # New sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND date_format(lastcontact, "%Y")='0000' AND noanswer='0'), # No answer sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND noanswer='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND noanswer='1'), # Timed Callback sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND NOT date_format(timedcallback, "%Y")='0000'), # Missed Timed Callbacks sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND timedcallback<date_format(now(), '%Y-%m-%d') AND NOT date_format(timedcallback, "%Y")='0000'), # High Priority sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND priority='1'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND priority='1'), # Normal Priority sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND priority='2'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND priority='2'), # Low Priority sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='O' AND priority='3'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='O' AND priority='3'), # Monitor sum(TO_DAYS(creationdate)<TO_DAYS(now() - INTERVAL 6 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 6 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 5 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 4 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 3 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 2 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() - INTERVAL 1 DAY) AND status='M'), sum(TO_DAYS(creationdate)=TO_DAYS(now() ) AND status='M') FROM ticketsys WHERE project=? AND assignedto='POOL' GROUP BY project}; my $sth = $dbh->prepare($query); $sth->execute($project) || error("Cannot execute: $DBI::errstr"); my ($newolder, $newtodayminus6, $newtodayminus5, $newtodayminus4, $newtodayminus3, $newtodayminus2, $newtodayminus1, $newtoday, $naolder, $natodayminus6, $natodayminus5, $natodayminus4, $natodayminus3, $natodayminus2, $natodayminus1, $natoday, $tcolder, $tctodayminus6, $tctodayminus5, $tctodayminus4, $tctodayminus3, $tctodayminus2, $tctodayminus1, $tctoday, $mcolder, $mctodayminus6, $mctodayminus5, $mctodayminus4, $mctodayminus3, $mctodayminus2, $mctodayminus1, $mctoday, $hpolder, $hptodayminus6, $hptodayminus5, $hptodayminus4, $hptodayminus3, $hptodayminus2, $hptodayminus1, $hptoday, $npolder, $nptodayminus6, $nptodayminus5, $nptodayminus4, $nptodayminus3, $nptodayminus2, $nptodayminus1, $nptoday, $lpolder, $lptodayminus6, $lptodayminus5, $lptodayminus4, $lptodayminus3, $lptodayminus2, $lptodayminus1, $lptoday, $monolder, $montodayminus6, $montodayminus5, $montodayminus4, $montodayminus3, $montodayminus2, $montodayminus1, $montoday); $sth->bind_columns( undef, \$newolder, \$newtodayminus6, \$newtodayminus5, \$newtodayminus4, \$newtodayminus3, \$newtodayminus2, \$newtodayminus1, \$newtoday, \$naolder, \$natodayminus6, \$natodayminus5, \$natodayminus4, \$natodayminus3, \$natodayminus2, \$natodayminus1, \$natoday, \$tcolder, \$tctodayminus6, \$tctodayminus5, \$tctodayminus4, \$tctodayminus3, \$tctodayminus2, \$tctodayminus1, \$tctoday, \$mcolder, \$mctodayminus6, \$mctodayminus5, \$mctodayminus4, \$mctodayminus3, \$mctodayminus2, \$mctodayminus1, \$mctoday, \$hpolder, \$hptodayminus6, \$hptodayminus5, \$hptodayminus4, \$hptodayminus3, \$hptodayminus2, \$hptodayminus1, \$hptoday, \$npolder, \$nptodayminus6, \$nptodayminus5, \$nptodayminus4, \$nptodayminus3, \$nptodayminus2, \$nptodayminus1, \$nptoday, \$lpolder, \$lptodayminus6, \$lptodayminus5, \$lptodayminus4, \$lptodayminus3, \$lptodayminus2, \$lptodayminus1, \$lptoday, \$monolder, \$montodayminus6, \$montodayminus5, \$montodayminus4, \$montodayminus3, \$montodayminus2, \$montodayminus1, \$montoday); $sth->fetch(); $sth->finish();
Any help in taming the monster would be nice.
Randy B.
|
| | 1 answer | Add comment |
Thursday, 18 January 2007
|
| Visual C++ Express Problems Oliver Hinken 19:03:17 |
| | Hallo,
i tried use the mysql++ api, but i got some problems i can't solve. One of the problems is with header files like winsock.h, windows.h and win.h. They aren't come with VCE, can't find them on my system. I copied them from VC6 but i got some errors, redefinitons, no declared things aso.
I have done all what is written in der readme file which comes with mysql++, set folders and settings, listed there. but it didn't work. The only thing i can't find in VCE is managed extension i'm using VCE in German (cause im German). I tried to use the newest version of the 4.1 series but i also don't want to work.
I have written a little Intranetpage for my office in php with that (older version of) mysql server and now i want to rewritte it with c++. The examples that comes with mysql++ also don't work.
If i delete the headerfiles i copied i get errors that he cant find that header files. I think its only a little mistake, but can't find out where it does come from.
Maybe someone of you is able to help (hope so)
(sry for my bad english) |
| | 1 answer | Add comment |
|
| SELECT from 3 tables - Need help Nuno Oliveira 19:00:12 |
| | Hi All,
I'm working on a Intranet database with a few tables to allow all the workers from the company to access it.
However, I'm facing a problem with a QUERY. I've did try to use JOIN but I'm not able to get the results I need...
I have 3 tables (concerning this problem):
Table 'Quotes' QuoteID ClientID Date Price Comments
Table 'Clients' ClientID Name Address Email
Table 'Products' QuoteID ProductName ProductType ProductShape
After filling the info to table quotes, I would like to do a QUERY to SELECT a specific QuoteID and also to JOIN to the result the client information (being ClientID the relation) and also to JOIN the information of the product if available (being QuoteID the relation).
The problem is that if there is no data in table 'Products' that matched QuoteID from table 'Quotes' than, the field 'QuoteID' is returned empty.
I would like to do a SELECT that would return all the fields in the 'Quotes' table plus the client info and plus the product info but only if available. If product info is not available I would like to get a result having all 'Quotes' info and 'Clients' info.
My query is:
SELECT * FROM `Quotes` LEFT JOIN (`Products`,`Clientes`) ON (`Products`.`QuoteID`=`Quotes`.`QuoteID` AND `Clientes`.`ClientID`=`Quotes`.`ClientID`) WHERE `Quotes`.`QuoteID`=6936
Any suggestion?
Thanks
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 6 answers | Add comment |
|
| Replication help, please Mikhail Berman 18:20:35 |
| | Dear List, As recently as last Sunday January 14, 2007, we have enabled replication between two servers in our organization. The master server runs MySQL 4.1.10a, the slave runs 5.0.18. Since then, we have had a number of interruptions in replication when the slave server stopped replicating for different reasons. I was able to fix the problems pointed out by the error log on the slave server, but I am witnessing strange behavior on the part of the slave. Every time, I look up slave status using "show slave status", I see the value of Seconds_Behind_Master getting bigger nor smaller as one would expect. I am pasting actual reports of "show slave status" at the end of this E-mail. Could anyone help me to find out why the slave reports such thing, and how to overcome it. mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: saruman Master_User: alatarreplica Master_Port: 3306 Connect_Retry: 60 Master_Log_File: SB2000-bin.000139 Read_Master_Log_Pos: 857395571 Relay_Log_File: alatar-relay-bin.000005 Relay_Log_Pos: 190740012 Relay_Master_Log_File: SB2000-bin.000139 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: secdocs Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 190663065 Relay_Log_Space: 858304045 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 285342 1 row in set (0.00 sec) ERROR: No query specified mysql> show slave status\G; *************************** 1. row *************************** Slave_IO_State: Waiting for master to send event Master_Host: saruman Master_User: alatarreplica Master_Port: 3306 Connect_Retry: 60 Master_Log_File: SB2000-bin.000139 Read_Master_Log_Pos: 857395745 Relay_Log_File: alatar-relay-bin.000005 Relay_Log_Pos: 190740012 Relay_Master_Log_File: SB2000-bin.000139 Slave_IO_Running: Yes Slave_SQL_Running: Yes Replicate_Do_DB: secdocs Replicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 0 Last_Error: Skip_Counter: 0 Exec_Master_Log_Pos: 190663065 Relay_Log_Space: 858304221 Until_Condition: None Until_Log_File: Until_Log_Pos: 0 Master_SSL_Allowed: No Master_SSL_CA_File: Master_SSL_CA_Path: Master_SSL_Cert: Master_SSL_Cipher: Master_SSL_Key: Seconds_Behind_Master: 285344 1 row in set (0.00 sec) ERROR: No query specified
Your help is greatly appreciated, Mikhail Berman Ives Group
|
| | Add comment |
|
| Strange InnoDB Deadlock Behavior Jason J. W. Williams 14:36:43 |
| | Hello All,
I have an issue that is seemingly hard to troubleshoot. Every so often transactions/queries on InnoDB tables will stack up such that all the queries appear to be waiting for others to execute. The problem is that the others never finish executing. If you try to kill the "Updating" threads/queries they never die. Restarting the program executing the queries also doesn't help. The only way to break out is to "kill -9" mysql. The update load on the MySQL server is fairly constant. I've been monitoring this for a couple of days and every time I check (the most recent being last night) there are no outstanding queries in the PROCESSLIST or SHOW INNODB STATUS. Also, even during this issue there are no deadlocks listed/recognized by InnoDB. I've included the full "SHOW PROCESSLIST" and "SHOW INNODB STATUS" outputs from during the event. Whatever causes this, it seems to come upon the server fairly quickly.
Any help is greatly appreciated. Thank you in advance!
Best Regards, Jason
---SHOW PROCESS LIST---
*************************** 1. row *************************** Type: InnoDB Name: Status: ===================================== 070114 22:09:05 INNODB MONITOR OUTPUT ===================================== Per second averages calculated from the last 23 seconds ---------- SEMAPHORES ---------- OS WAIT ARRAY INFO: reservation count 16008, signal count 15657 Mutex spin waits 0, rounds 0, OS waits 0 RW-shared spins 29962, OS waits 15019; RW-excl spins 1188, OS waits 989 ------------ TRANSACTIONS ------------ Trx id counter 0 1472286 Purge done for trx's n:o < 0 1472274 undo n:o < 0 0 History list length 15 Total number of lock structs in row lock hash table 1 LIST OF TRANSACTIONS FOR EACH SESSION: ---TRANSACTION 0 0, not started, OS thread id 189 MySQL thread id 1280, query id 330126 localhost root SHOW INNODB STATUS ---TRANSACTION 0 0, not started, OS thread id 188 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1276, query id 330118 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(11, '8563800928955791106', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 187 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1275, query id 330117 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(433, '3228125312310094225', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 186 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1274, query id 330116 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(2443, '15435722262529763403', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 185 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1273, query id 330115 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(398, '15160676287902524852', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 184 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1272, query id 330114 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(3966, '14528798056022965668', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 183 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1271, query id 330113 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(693, '5421332010014503916', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 182 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1270, query id 330112 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1386, '16292377253775848661', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 181 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1269, query id 330111 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1759, '18108299569491841277', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 180 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1268, query id 330105 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(2072, '15353583257255433130', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 179 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1267, query id 330103 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1038, '601210067541728201', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 178 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1266, query id 330102 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(535, '3755401304079536039', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 177 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1265, query id 330101 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(421, '10973999742891970959', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 176 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1264, query id 330100 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(438, '15200628614960339949', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 175 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1263, query id 330099 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '12229108568889084721', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 174 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1262, query id 330098 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(333, '14990782145574077923', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 173 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1261, query id 330097 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1372, '15479680000856169010', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 172 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1260, query id 330096 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 1153 and token in('13886526367306062682') ---TRANSACTION 0 0, not started, OS thread id 171 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1259, query id 330095 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(2443, '15435722262529763403', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 170 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1258, query id 330094 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(456, '9365264194700954954', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 169 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1257, query id 330093 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(947, '16115090353931693588', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 168 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1256, query id 330092 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '2917333194889300017', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 167 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1255, query id 330091 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1383, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 166 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1254, query id 330090 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1447, '15733443064039097693', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 165 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1253, query id 330089 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(26, '5775323334071626545', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 164 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1252, query id 330088 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(709, '8354553082750092635', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 163 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1251, query id 330087 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(396, '6450138460296755841', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 162 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1250, query id 330086 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(109, '2633501858524652845', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 161 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1249, query id 330085 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(2072, '15353583257255433130', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 160 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1248, query id 330084 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(553, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 158 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1246, query id 330082 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(3966, '14528798056022965668', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 157 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1245, query id 330081 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(421, '10973999742891970959', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 156 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1244, query id 330078 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(3966, '14528798056022965668', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 155 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1243, query id 330077 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1381, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 154 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1242, query id 330076 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1842, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 153 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1241, query id 330074 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(109, '2633501858524652845', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 152 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1240, query id 330073 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1447, '15733443064039097693', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 151 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1239, query id 330069 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(439, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 150 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1238, query id 330067 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1107, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 149 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1237, query id 330065 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(402, '5791804340630811603', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 148 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1236, query id 330063 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 437 and token in('176034204053473251') ---TRANSACTION 0 0, not started, OS thread id 147 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1235, query id 330062 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 437 and token in('176034204053473251') ---TRANSACTION 0 0, not started, OS thread id 146 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1234, query id 330061 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1372, '15479680000856169010', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 145 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1233, query id 330060 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(2495, '15479680000856169010', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 144 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1232, query id 330059 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1759, '18108299569491841277', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 143 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1231, query id 330058 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(147, '8368925849360969935', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 141 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1229, query id 330057 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '2917333194889300017', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 142 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1230, query id 330056 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1381, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 140 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1228, query id 330055 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '2917333194889300017', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 139 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1227, query id 330054 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1842, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 138 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1226, query id 330053 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1383, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 137 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1225, query id 330052 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(396, '6450138460296755841', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 136 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1224, query id 330051 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 1378 and token in('10405022649306011353') ---TRANSACTION 0 0, not started, OS thread id 135 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1223, query id 330050 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(109, '2633501858524652845', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 134 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1222, query id 330049 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(535, '3755401304079536039', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 133 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1221, query id 330048 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(421, '10973999742891970959', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 132 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1220, query id 330047 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(438, '15200628614960339949', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 131 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1219, query id 330046 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1447, '15733443064039097693', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 130 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1218, query id 330045 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(26, '5775323334071626545', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 129 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1217, query id 330044 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(709, '8354553082750092635', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 0, not started, OS thread id 128 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1216, query id 330043 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 2508 and token in('4557255557211275077') ---TRANSACTION 0 0, not started, OS thread id 127 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1215, query id 330040 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1107, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448153, not started, OS thread id 116 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1133, query id 330041 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(354, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448149, not started, OS thread id 115 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1132, query id 330042 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(439, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448148, not started, OS thread id 117 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1134, query id 330031 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(438, '15200628614960339949', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448141, not started, OS thread id 124 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1141, query id 330034 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 1378 and token in('10405022649306011353') ---TRANSACTION 0 1448138, not started, OS thread id 120 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1137, query id 330033 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(535, '3755401304079536039', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448137, not started, OS thread id 126 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1143, query id 330038 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(402, '5791804340630811603', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448131, not started, OS thread id 125 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1142, query id 330035 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 437 and token in('176034204053473251') ---TRANSACTION 0 1448129, not started, OS thread id 123 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1140, query id 330039 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(553, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448124, not started, OS thread id 121 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1138, query id 330032 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(421, '10973999742891970959', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448120, not started, OS thread id 119 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1136, query id 330037 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 334 and token in('6364824612906886657') ---TRANSACTION 0 1448122, not started, OS thread id 113 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1131, query id 330036 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 437 and token in('176034204053473251') ---TRANSACTION 0 1472047, not started, OS thread id 23 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1129, query id 330030 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1447, '15733443064039097693', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448104, not started, OS thread id 25 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1066, query id 330080 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1759, '18108299569491841277', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448106, not started, OS thread id 15 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1063, query id 330079 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(147, '8368925849360969935', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1472275, not started, OS thread id 67 MySQL thread id 1065, query id 330020 10.1.58.43 istat end update stats set spam_learned = spam_learned - 0, innocent_learned = innocent_learned - 0, spam_misclassified = spam_misclassified - 0, innocent_misclassified = innocent_misclassified - 0, spam_corpusfed = spam_corpusfed - 0, innocent_corpusfed = innocent_corpusfed - 0, spam_classified = spam_classified + 1, innocent_classified = innocent_classified - 0 where uid = 334 ---TRANSACTION 0 1448101, not started, OS thread id 17 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1064, query id 330110 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1381, '13837287625678618', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448110, not started, OS thread id 49 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 1062, query id 330108 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '12229108568889084721', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1472276, not started, OS thread id 40 mysql tables in use 1, locked 1 MySQL thread id 736, query id 330018 10.1.58.43 istat update insert into signature_data(uid, signature, length, created_on, data) values(437, "45aaa64336072326010550", 13408, current_date(), "r?Jk?@~\0\0\0\0\0\0\0??\'?K\0\0\0\0\0\0\0\0\0????P\0\0\0\0\0\0\0\'=??hC?\0\0\0\0\0\0\0&~??)???\0\0\0\0\0\0\0?
??}E?\0\0\0\0\0\0\0\'=?vM?\0\0\0\0\0\0\0?;r2???p\0\0\0\0\0\0\0\0\0\0?h?wM\0\0\0\0\0\0\0{?
??32?\0\0\0\0\0\0\0??E~|??\0\0\0\0\0\0\0E~?C???\0\0\0\0\0\0\0\0\0\0? ?{R\0\0\0\0\0\0\0? ??O\0B?\0\0\0\0\0\0\0P?;r??\Z?\0\0\0\0\0\0\0\0\0\0??g?C
\0\0\0\0\0\0\0\0\0\0??\'?C\0\0\0\0\0\0\0\0\0\0\0\0??S\0\0\0\0\0\0\0?w?s??9\0\0\0\0\0\0\0? ---TRANSACTION 0 1448089, not started, OS thread id 27 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 539, query id 330075 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(438, '15200628614960339949', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1472272, not started, OS thread id 114 MySQL thread id 402, query id 330021 10.1.58.42 istat Table lock insert into stats(uid, spam_learned, innocent_learned, spam_misclassified, innocent_misclassified, spam_corpusfed, innocent_corpusfed, spam_classified, innocent_classified) values(437, 0, 0, 0, 0, 0, 0, 174, 6) ---TRANSACTION 0 1448091, not started, OS thread id 55 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 390, query id 330109 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(693, '5421332010014503916', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448095, not started, OS thread id 35 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 368, query id 330106 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 1153 and token in('13886526367306062682') ---TRANSACTION 0 1448105, not started, OS thread id 30 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 296, query id 330072 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(26, '5775323334071626545', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448098, not started, OS thread id 69 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 59, query id 330071 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 2508 and token in('4557255557211275077') ---TRANSACTION 0 1441646, not started, OS thread id 18 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 8, query id 330104 10.1.58.42 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 1378 and token in('10405022649306011353') ---TRANSACTION 0 1441642, not started, OS thread id 19 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 9, query id 330070 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(61, '7849275369291257064', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1441641, not started, OS thread id 68 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 58, query id 330107 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(170, '12229108568889084721', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1441651, not started, OS thread id 66 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 56, query id 330068 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(354, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1448115, not started, OS thread id 16 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 6, query id 330066 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(553, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) ---TRANSACTION 0 1441637, not started, OS thread id 65 waiting in InnoDB queue mysql tables in use 1, locked 1 MySQL thread id 55, query id 330064 10.1.58.43 istat Updating update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) where uid = 334 and token in('6364824612906886657') ---TRANSACTION 0 1472285, ACTIVE 902 sec, OS thread id 159 waiting in InnoDB queue mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s) MySQL thread id 1247, query id 330083 10.1.58.42 istat update insert into virtual_uids (uid, username) values(NULL, 'fxyinside@bsmwireless.com') Trx has approximately 0 row locks ---TRANSACTION 0 1472284, ACTIVE 958 sec, OS thread id 24, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 1128, query id 330029 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(26, '5775323334071626545', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472283, ACTIVE 959 sec, OS thread id 42, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 1127, query id 330028 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(709, '8354553082750092635', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472282, ACTIVE 959 sec, OS thread id 118, thread declared inside InnoDB 498 mysql tables in use 1, locked 1 2 lock struct(s), heap size 3201 row lock(s), undo log entries 1 MySQL thread id 1135, query id 330027 10.1.58.43 istat end update token_data set last_hit = current_date(), spam_hits = greatest(0, spam_hits - 0), innocent_hits = greatest(0, innocent_hits + 1) where uid = 2508 and token in('4557255557211275077') Trx has approximately 1 row locks ---TRANSACTION 0 1472281, ACTIVE 962 sec, OS thread id 21, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 538, query id 330026 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(1107, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472280, ACTIVE 962 sec, OS thread id 13, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 1130, query id 330025 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(553, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472279, ACTIVE 962 sec, OS thread id 29, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 1067, query id 330024 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(354, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472278, ACTIVE 962 sec, OS thread id 122, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 1139, query id 330023 10.1.58.43 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(439, '8597574295759244867', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks ---TRANSACTION 0 1472277, ACTIVE 963 sec, OS thread id 37, thread declared inside InnoDB 500 mysql tables in use 1, locked 1 1 lock struct(s), heap size 3200 row lock(s), undo log entries 1 MySQL thread id 297, query id 330022 10.1.58.42 istat update insert into token_data(uid, token, spam_hits, innocent_hits, last_hit) values(402, '5791804340630811603', 1, 0, current_date()) ON DUPLICATE KEY UPDATE last_hit = current_date(), spam_hits = greatest(0, spam_hits + 1), innocent_hits = greatest(0, innocent_hits - 0) Trx has approximately 0 row locks -------- FILE I/O -------- I/O thread 0 state: waiting for i/o request (insert buffer thread) I/O thread 1 state: waiting for i/o request (log thread) I/O thread 2 state: waiting for i/o request (read thread) I/O thread 3 state: waiting for i/o request (write thread) Pending normal aio reads: 0, aio writes: 0, ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0 Pending flushes (fsync) log: 0; buffer pool: 0 15763 OS file reads, 1110491 OS file writes, 114035 OS fsyncs 0.00 reads/s, 0 avg bytes/read, 0.00 writes/s, 0.00 fsyncs/s ------------------------------------- INSERT BUFFER AND ADAPTIVE HASH INDEX ------------------------------------- Ibuf: size 1, free list len 5, seg size 7, 5858 inserts, 5858 merged recs, 2230 merges Hash table size 4980539, used cells 186467, node heap has 188 buffer(s) 0.00 hash searches/s, 0.00 non-hash searches/s --- LOG --- Log sequence number 1 2122604229 Log flushed up to 1 2122602034 Last checkpoint at 1 2122602034 0 pending log writes, 0 pending chkp writes 415701 log i/o's done, 0.00 log i/o's/second ---------------------- BUFFER POOL AND MEMORY ---------------------- Total memory allocated 1367085783; in additional pool allocated 693888 Dictionary memory allocated 40096 Buffer pool size 76800 Free buffers 1066 Database pages 75546 Modified db pages 40 Pending reads 0 Pending writes: LRU 0, flush list 0, single page 0 Pages read 15936, created 59610, written 742793 0.00 reads/s, 0.00 creates/s, 0.00 writes/s No buffer pool page gets since the last printout -------------- ROW OPERATIONS -------------- 8 queries inside InnoDB, 89 queries in queue 1 read views open inside InnoDB Main thread id 9, state: waiting for server activity Number of rows inserted 183511, updated 177804, deleted 0, read 177854 0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s ---------------------------- END OF INNODB MONITOR OUTPUT ============================
1 row in set, 1 warning (0.02 sec)
ERROR: No query specified
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 3 answer | Add comment |
|
| Load Balance on MySql Shain Lee 12:34:13 |
| | Hi Friends ,
I have huge WAP content database and it's included with wallpapers, ringtones, games ...etc.That content database getting hits more that 1000 /sec. This is actually massive. My Webserver s are Tomcat and apache , because some applications written in java and some are php . perl. Hence i needed to use that both wap servers.Due high load for the content database ,it's getting hang/stuck/panic. I couldn't even restart the mysql service. I have restart the machine , no any other way to release the stucked load.
OS - RHEL : 2.6.9-42.0.3.ELsmp MySql - 4.1.7
[mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock
old_passwords=1 ######################### flush back_log=2000 connect_timeout=10 interactive_timeout=25 join_buffer_size=4M key_buffer=1024M max_allowed_packet=64M max_connections=2000 max_connect_errors=100000 myisam_sort_buffer_size=256M read_buffer_size=8M read_rnd_buffer_size=8M sort_buffer_size=8M table_cache=4096 thread_cache_size=400 thread_concurrency=16 wait_timeout=50 query_cache_size=1024M query_cache_limit=32M query_cache_type=1 log=/var/log/mysqld_sql.log log-error=/var/log/mysqld_error.log #########################
[mysql.server] user=mysql basedir=/var/lib
[mysqld_safe] err-log=/var/log/mysqld.log pid-file=/var/run/mysqld/mysqld.pid
Now , i have to think about any perfect load balancing method , i can't duplicate the databse in another machine. It's directly conflict with serving contents for each request.
can somebody help me on it ? what would be the perfect way to have a balance the load ? How can we take the statics of mysql databse ? is there any open source product available ?
Thanx in advance, Shaine.
--------------------------------- New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. |
| | 3 answer | Add comment |
|
| automated character set conversions for tables Valentin Nils 10:32:48 |
| | Hello fellow MySQL friends,
I recently had the "fun" to convert some 60 tables within a DB f.e. from latin1 to UTF8.
I did a DB conversion before that with "ALTER DATABASE db_name CHARACTER SET utf8" That worked wonderfully, except not as expected. It basically converted only the database itself. so I had to do a separate "ALTER TABLE ..." for each table.
Are you aware of a much smarter way to do this ? (perhaps a function I missed, script, batch file etc.)
Best regards
Nils Valentin http://www.be-known-online.com/mysql
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 3 answer | Add comment |
|
| yum version 5.* Karl Larsen 05:16:52 |
| | I am using Red Hat Fedora Core 4 and I wanted to yum mysql version 5 of any other and find with Core 4 I can yum only mysql version 4.
I imagine Core 5 might be able to yum mysql version 5 but not certain of that. Is there a way I can yum the later version? I studied the man for yum but could not see a way to do that.
Karl Larsen
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 2 answer | Add comment |
|
| mysqld_safe failing Nishant Gupta 05:10:17 |
| | Hi all
When i try to run mysqld_safe cmd, it fails saying : Starting mysqld daemon with databases from /var/lib/mysql STOPPING server from pid file /var/run/mysqld/mysqld.pid 070105 20:23:40 mysqld ended
Also mysqld.pid does not exist at the given path!
Any Idea what to do??? mysql_install_db is running fine as well.
Contents of mysqld.log are :
070105 20:23:40 mysqld started InnoDB: Error: auto-extending data file ./ibdata1 is of a different size InnoDB: 0 pages (rounded down to MB) than specified in the .cnf file: InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages! InnoDB: Could not open or create data files. InnoDB: If you tried to add new data files, and it failed here, InnoDB: you should now edit innodb_data_file_path in my.cnf back InnoDB: to what it was, and remove the new ibdata files InnoDB created InnoDB: in this failed attempt. InnoDB only wrote those files full of InnoDB: zeros, but did not yet use them in any way. But be careful: do not InnoDB: remove old data files which contain your precious data! 070105 20:23:40 [ERROR] Can't init databases 070105 20:23:40 [ERROR] Aborting
070105 20:23:40 [Note] /usr/libexec/mysqld: Shutdown complete
070105 20:23:40 mysqld ended
When i tried to see the shell script running, i get the following msg:
sh -x bin/mysqld_safe --user=root + KILL_MYSQLD=1 + trap '' 1 2 3 15 + umask 007 + defaults= + case "$1" in ++ pwd + MY_PWD=/usr + test -d /usr/data/mysql -a -f ./share/mysql/english/errmsg.sys -a -x ./bin/mysqld + test -f ./var/mysql/db.frm -a -f ./share/mysql/english/errmsg.sys -a -x ./libexec/mysqld + MY_BASEDIR_VERSION=/usr + DATADIR=/var/lib/mysql + ledir=/usr/libexec + user=mysql + niceness=0 + test -x /usr/libexec/mysqld-max + MYSQLD=mysqld + pid_file= + err_log= + test -x ./bin/my_print_defaults + print_defaults=./bin/my_print_defaults + args= + SET_USER=2 ++ ./bin/my_print_defaults --loose-verbose mysqld server + parse_arguments --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --old_passwords=1 + pick_args= + test --datadir=/var/lib/mysql = PICK-ARGS-FROM-ARGV + for arg in '"$@"' + case "$arg" in ++ echo --datadir=/var/lib/mysql ++ sed -e 's;--datadir=;;' + DATADIR=/var/lib/mysql + for arg in '"$@"' + case "$arg" in ++ echo --socket=/var/lib/mysql/mysql.sock ++ sed -e 's;--socket=;;' + mysql_unix_port=/var/lib/mysql/mysql.sock + for arg in '"$@"' + case "$arg" in + test -n '' + test 2 -eq 2 + SET_USER=0 ++ ./bin/my_print_defaults --loose-verbose mysqld_safe safe_mysqld + parse_arguments --err-log=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid + pick_args= + test --err-log=/var/log/mysqld.log = PICK-ARGS-FROM-ARGV + for arg in '"$@"' + case "$arg" in ++ echo --err-log=/var/log/mysqld.log ++ sed -e 's;--err-log=;;' + err_log=/var/log/mysqld.log + for arg in '"$@"' + case "$arg" in ++ echo --pid-file=/var/run/mysqld/mysqld.pid ++ sed -e 's;--pid-file=;;' + pid_file=/var/run/mysqld/mysqld.pid + parse_arguments PICK-ARGS-FROM-ARGV --user=root + pick_args= + test PICK-ARGS-FROM-ARGV = PICK-ARGS-FROM-ARGV + pick_args=1 + shift + for arg in '"$@"' + case "$arg" in ++ echo --user=root ++ sed -e 's;--[^=]*=;;' + user=root + SET_USER=1 + safe_mysql_unix_port=/var/lib/mysql/mysql.sock + test '!' -x /usr/libexec/mysqld + test -z /var/run/mysqld/mysqld.pid + case "$pid_file" in + test -z /var/log/mysqld.log + test -n /var/lib/mysql/mysql.sock + args='--socket=/var/lib/mysql/mysql.sock ' + test -n '' + test 0 -eq 0 + NOHUP_NICENESS=nohup + nohup nice ++ nice + normal_niceness=0 ++ nohup nice + nohup_niceness=0 + numeric_nice_values=1 + for val in '$normal_niceness' '$nohup_niceness' + case "$val" in + for val in '$normal_niceness' '$nohup_niceness' + case "$val" in + test 1 -eq 1 + nice_value_diff=0 + test 1 -eq 0 + USER_OPTION= + test -w / -o root = root + test root '!=' root -o 1 = 1 + USER_OPTION=--user=root + touch /var/log/mysqld.log + chown root /var/log/mysqld.log + test -n '' + test -n '' + test -f /var/run/mysqld/mysqld.pid + echo 'Starting mysqld daemon with databases from /var/lib/mysql' Starting mysqld daemon with databases from /var/lib/mysql ++ date '+%y%m%d %H:%M:%S mysqld started' + echo '070105 20:22:45 mysqld started' + true + rm -f /var/lib/mysql/mysql.sock /var/run/mysqld/mysqld.pid + test -z '--socket=/var/lib/mysql/mysql.sock ' + eval 'nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=root --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock >> /var/log/mysqld.log 2>&1' ++ nohup /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=root --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --socket=/var/lib/mysql/mysql.sock + test '!' -f /var/run/mysqld/mysqld.pid + echo 'STOPPING server from pid file /var/run/mysqld/mysqld.pid' STOPPING server from pid file /var/run/mysqld/mysqld.pid + break ++ date '+%y%m%d %H:%M:%S' + echo '070105 20:22:45 mysqld ended' + tee -a /var/log/mysqld.log 070105 20:22:45 mysqld ended + echo '' + tee -a /var/log/mysqld.log
-- Bye for now, Nishant
God Gave Me Nothing I Wanted, He Gave Me Everything I Needed !
|
| | 1 answer | Add comment |
|
| [PART 1/2] InnoDB - Different EXPLAINs for same query John Anderson 04:19:58 |
| | Greetings,
It seems the lists.mysql.com imposes a 50KB limit on messages, so this message will be sent in two parts. Thanks for your patience.
I'm in the process of converting most of my databases from MyISAM to InnoDB, and I've come across the most peculiar problem. It seems that after running for some time, MySQL starts to choose different indexes to run same the exact same query with! After the daemon has been up and running for an undetermined amount of time, the output of EXPLAIN on some queries differs from the output of EXPLAIN taken upon server startup! The different EXPLAIN usually means a much, much slower query. This only happens on InnoDB tables.
I can reproduce this error in both MySQL 5.0.24 and MySQL 5.0.27 installed from source on x86_64 Linux. The running kernel is 2.6.14.6, glibc is 2.3.9, and MySQL is linked against OpenSSL 0.9.8a
Here's an example of what I mean by the exact same query being run in different ways:
After the server has been up and running for a couple of days, I get complaints from end users about web applications running slowly. I log in and look at the processlist and see some queries have been "on the clock" for over 400 seconds. Since I'm testing and have separate InnoDB and MyISAM servers, I push the front ends back to the MyISAM version of the database, and begin troubleshooting the query on the now unused InnoDB version.
mysql> EXPLAIN SELECT COUNT(rb.subscription_id) as recurring_cc_count,
-> SUM(rb.grace_price) as recurring_cc,
-> COUNT(sb.subscription_id) as single_cc_count,
-> SUM(sb.initial_amt) as single_cc
-> FROM customerdetail a
-> LEFT JOIN recurringbilling rb
-> ON a.subscription_id = rb.subscription_id
-> LEFT JOIN singlebilling sb
-> ON a.subscription_id = sb.subscription_id
-> LEFT JOIN (global.subscriptionExchangeRate as ser INNER JOIN global.currencyCodes as cur)
-> ON (a.subscription_id = ser.subscriptionId AND ser.billedCurrencyCode = cur.currencyCode)
-> WHERE client_accnum = '12345'
-> AND a.trans_timestamp
-> BETWEEN '20070108000000' AND '20070108235959';
+----+-------------+-------+--------+----------------------------------- -----------------------------+------------+---------+------------------- ------------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+-------+--------+----------------------------------- -----------------------------+------------+---------+------------------- ------------+-------+-------------+
| 1 | SIMPLE | a | ref | client_idx,trans_idx,accno_trans_idx,accnumactive,accsubactive | client_idx | 3 | const | 25032 | Using where |
| 1 | SIMPLE | rb | eq_ref | PRIMARY | PRIMARY | 8 | company.a.subscription_id | 1 | |
| 1 | SIMPLE | sb | eq_ref | PRIMARY | PRIMARY | 8 | company.a.subscription_id | 1 | |
| 1 | SIMPLE | ser | ref | PRIMARY,billedCurrencyCode | PRIMARY | 8 | company.a.subscription_id | 1 | |
| 1 | SIMPLE | cur | eq_ref | PRIMARY | PRIMARY | 2 | global.ser.billedCurrencyCode | 1 | Using index |
+----+-------------+-------+--------+----------------------------------- -----------------------------+------------+---------+------------------- ------------+-------+-------------+
5 rows in set (0.61 sec)
mysql> show index from customerdetail;
+----------------+------------+-----------------+--------------+-------- ---------+-----------+-------------+----------+--------+------+--------- ---+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+----------------+------------+-----------------+--------------+-------- ---------+-----------+-------------+----------+--------+------+--------- ---+---------+
| customerdetail | 0 | subscription | 1 | subscription_id | A | 49382031 | NULL | NULL | | BTREE | |
| customerdetail | 1 | client_idx | 1 | client_accnum | A | 86181 | NULL | NULL | | BTREE | |
| customerdetail | 1 | client_idx | 2 | client_subacc | A | 103309 | NULL | NULL | | BTREE |
........................SNIP.....................
+----+-------------+-------+--------+----------------------------------- -----------------------------+------------+---------+------------------- ------------+
mysql> SELECT SQL_NO_CACHE COUNT(rb.subscription_id) as recurring_cc_count,
-> SUM(rb.grace_price) as recurring_cc,
-> COUNT(sb.subscription_id) as single_cc_count,
-> SUM(sb.initial_amt) as single_cc
-> FROM customerdetail a
-> LEFT JOIN recurringbilling rb
-> ON a.subscription_id = rb.subscription_id
-> LEFT JOIN singlebilling sb
-> ON a.subscription_id = sb.subscription_id
-> LEFT JOIN (global.subscriptionExchangeRate as ser INNER JOIN global.currencyCodes as cur)
-> ON (a.subscription_id = ser.subscriptionId AND ser.billedCurrencyCode = cur.currencyCode)
-> WHERE client_accnum = '12345'
-> AND a.trans_timestamp
-> BETWEEN '20070108000000' AND '20070108235959';
+--------------------+--------------+-----------------+-----------+
| recurring_cc_count | recurring_cc | single_cc_count | single_cc |
+--------------------+--------------+-----------------+-----------+
| 4 | 119.80 | 0 | NULL |
+--------------------+--------------+-----------------+-----------+
1 row in set (434.77 sec)
As you can see, the optimizer has chosen to use the client_idx index for the customerdetail table which is a compound index of client_accnum and client_subacc, which in this particular table of 49299139 rows, has horrible cardinality. So I restart the server, log back in, and try the EXACT SAME THING again:
SEE NEXT PART
|
| | 3 answer | Add comment |
|
| libpcre.so.3 missing Daniel Kasak 00:41:49 |
| | Hi all.
I'm testing out the backup function of mysql-administrator on our Linux server. I currently have a bash backup script, but restoring currently requires me and my command-line skills
Anyway, I've created a backup profile and scheduled it, but it dies silently. I had a look at the cron job, found the line added, and run this from a console:
/opt/mysql-gui-tools-5.0/mabackup -d /root/sql -x Assets -c root Assets_backup
This provides the error:
/opt/mysql-gui-tools-5.0/mabackup: error while loading shared libraries: libpcre.so.3: cannot open shared object file: No such file or directory
On this system, I have ( in /usr/lib/ ):
screamer lib # ls -l libpcre* -rw-r--r-- 1 root root 150774 Jan 16 12:41 libpcre.a -rw-r--r-- 1 root root 786 Jan 16 12:41 libpcre.la lrwxrwxrwx 1 root root 16 Jan 16 12:41 libpcre.so -> libpcre.so.0.0.1 lrwxrwxrwx 1 root root 16 Jan 16 12:41 libpcre.so.0 -> libpcre.so.0.0.1 -rwxr-xr-x 1 root root 112564 Jan 16 12:41 libpcre.so.0.0.1 -rw-r--r-- 1 root root 37238 Jan 16 12:41 libpcrecpp.a -rw-r--r-- 1 root root 827 Jan 16 12:41 libpcrecpp.la lrwxrwxrwx 1 root root 19 Jan 16 12:41 libpcrecpp.so -> libpcrecpp.so.0.0.0 lrwxrwxrwx 1 root root 19 Jan 16 12:41 libpcrecpp.so.0 -> libpcrecpp.so.0.0.0 -rwxr-xr-x 1 root root 27932 Jan 16 12:41 libpcrecpp.so.0.0.0 -rw-r--r-- 1 root root 3928 Jan 16 12:41 libpcreposix.a -rw-r--r-- 1 root root 841 Jan 16 12:41 libpcreposix.la lrwxrwxrwx 1 root root 21 Jan 16 12:41 libpcreposix.so -> libpcreposix.so.0.0.0 lrwxrwxrwx 1 root root 21 Jan 16 12:41 libpcreposix.so.0 -> libpcreposix.so.0.0.0 -rwxr-xr-x 1 root root 5392 Jan 16 12:41 libpcreposix.so.0.0.0 screamer lib #
... and these belong to the package dev-libs/libpcre-6.6 ( on a Gentoo system ).
Who knows if I can create a sym-link to provide the missing libpcre.so.3? Do I need a particular version of libpcre?
Thanks.
Dan
-- Daniel Kasak IT Developer NUS Consulting Group Level 5, 77 Pacific Highway North Sydney, NSW, Australia 2060 T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989 email: dkasak@nusconsulting.com.au website: http://www.nusconsulting.com.au
-- MySQL GUI Tools Mailing List For list archives: http://lists.mysql.com/gui-tools To unsubscribe: http://lists.mysql.com/gui-tools?unsub=gcdmm-mycc@m.gmane.org
|
| | 1 answer | Add comment |
Wednesday, 17 January 2007
|
| Does Update allow for aliases? Richard Reina 22:27:36 |
| | I am trying to update from one table to another but I get a syntax error when I try: UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE o.ID=a.ID; If update does not support aliases, is there another way to do this query? I am usin V3.23.54. Any help would be greatly appreciated. Thanks, Richard
Your beliefs become your thoughts. Your thoughts become your words. Your words become your actions. Your actions become your habits. Your habits become your values. Your values become your destiny. -- Mahatma Gandhi |
| | 6 answers | Add comment |
|
| Having problems with what appears to be a simple query. Daniel Smith 22:02:44 |
| | I have a table with numerous columns but needing to perform a query based on three columns:
Lab_number, result, release_time.
What I want to do is search for lab_number where there is a result but not released. The problem that is making this difficult for me, is that there are multiple entries for the same lab_number, due to a lab_number having 1 or more tests being performed on it. The search I really want to do is find the lab_number where ALL the tests have been performed and not the lab_numbers which have partial results.
*-------------------------------------------------------* |lab_number|result|release_time| |1|10|0000-00-00 00:00:00| |1|20|0000-00-00 00:00:00| |2|5|0000-00-00 00:00:00| |2||0000-00-00 00:00:00| |3||0000-00-00 00:00:00| |3||0000-00-00 00:00:00| |3||0000-00-00 00:00:00| *-------------------------------------------------------*
So the query I want will only return 1, as 2 is not yet complete. The attempts I have made so far will return 2 as well. The thing that is really annoying me is that I know I will kick myself when I see a solution!
Thanks
Danny
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql@m.gmane.org
|
| | 4 answer | Add comment |
|
| Lost connection to MySQL server during query Alec Smith 21:42:42 |
| | Hi -
I'm getting the below error when trying to connect to a MySQL 4.0.12 server on RedHat 9 using a Perl script:
DBI connect('mailers:192.168.50.201','admin',...) failed: Lost connection to MySQL server during query at ./dialer line 24 Can't call method "prepare" on an undefined value at ./dialer line 28.
The client machines are RH9 also, using the 3.23.56 libraries and clients shipped with RedHat.
Any ideas where to start?
Thanks, Alec
-- MySQL Perl Mailing List For list archives: http://lists.mysql.com/perl To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m.gmane.org
|
| | 65 answers | Add comment |
|
| RE: threading was Lost connection to MySQL server during query Jim Wallace 20:28:58 |
| | I was doing the same thing, just using MySQL on the other thread, but since MySQL++ isn't MT, you really need to use the mysql api calls to setup threading. The online doc does a good job, but here's what I do
In main init: UINT tsafe = mysql_thread_safe(); assert( tsafe == 1 );
On thread:
if ( mysql_thread_init() != 0 ) error
...
mysql_thread_end();
-----Original Message----- From: Warren Young [mailto:mysqlpp@etr-usa.com] Sent: Wednesday, January 17, 2007 12:05 PM To: MySQL++ Mailing List Subject: Re: Lost connection to MySQL server during query
Urscheler, Roger (COM Chantry CA) wrote:>
Does mysql++ 2.2 provide more functionallity regarding threading? Not really. It's all scheduled for v2.4. (Not v2.3 because that's a release for stuff I want to get out of the way fairly quickly, which ideally would have been in v2.2. v2.3 basically exists because I didn't want to delay v2.2 any longer.)
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=jwallace@kaneva.com
-- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@m.gmane.org
|
| | Add comment |
|
|