Quantcast
Channel: MySQL Forums - InnoDB
Viewing all 1954 articles
Browse latest View live

When I need to use AnaLYZE?? (3 replies)

$
0
0
Hi everyone!!!

I'm developing mysql alarms, and I need to send an alarm when the tables need to be analyzed, but I don't know how or where take this information. The alarm is obsolete statistics.

Error Number 5 when loading from mysqldump (12 replies)

$
0
0
I'm getting errors on CREATE TALBE and INSERT from a mysqldump, where the error appears to be coming from Windows AIO.

I recently setup a system that will become my development workstation:
* Windows 7 Professional, version 6.1, Build 7601: Service Pack 1)
* MySQL 5.1.56
* Innodb engine
* file-per-table

I loaded a mysqldump from my old production machine (MySQL 4.1, 32-bit, Windows) and it loaded fine. I then upgraded to a new production server running MySQL 5.1.56, 64-bit, WindowsServer 2008 R2, version 6.1 , build 7601 service pack 1.

Then I did a mysqldump from my production db, and tried to load it on my test db. When I loaded the script with just the CREATE TABLE statements (~840 tables), a few tables gave errors:

ERROR 1005 (HY000) at line 41: Can't create table 'localtest.asset_type_drive_forces' (errno: 135)

Here is a section from the error log:

110822 16:09:29 InnoDB: Error: Write to file .\localtest\asset_type_drive_forces.ibd failed at offset 0 0.
InnoDB: 65536 bytes should have been written, only 0 were written.
InnoDB: Operating system error number 5.
InnoDB: Check that your OS and file system support files of this size.
InnoDB: Check also that the disk is not full or a disk quota exceeded.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
110822 16:09:29 InnoDB: Warning: cannot create table `localtest`.`asset_type_drive_forces` because tablespace full

There is tons of disk space, and I just had the table containing data the previous day. I got the error on about 5 out of 840 tables. So I copied the CREATE TABLE statements from the big script to a separate script. Ran that ok, so no problem with the table schema.

Then I tried to load the records into the table, and I get:

110822 22:23:01 InnoDB: Operating system error number 5 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory. It may also be you have created a subdirectory
InnoDB: of the same name as a data file.
InnoDB: File name .\localtest\adjusted_factor_return.ibd
InnoDB: File operation call: 'Windows aio'.
InnoDB: Cannot continue operation.

There is nothing unusual about the adjusted_factor_return table.

It seems to me that MySQL is having trouble with the file i/o calls to Windows.

I searched forums and web and could not find this problem described. Any help would be greatly appreciated.

ERROR - Number of indexes inside innodb are different to number of indexes in the MySQL ??? (6 replies)

$
0
0
Hi Guys,

First time poster, long time searcher of these forums :) I have an error I can't find anything about on the Internet, and more importantly, I have no idea what it means.

First up, my machine is a linux rhel5 VM x86_64 running mysql 5.5.14 (not rpm installed, tar install)

I keep seeing the following in the MySQL err log:

110812 2:27:07 [ERROR] Table mydb/tblCalc contains 3 indexes inside InnoDB, which is different from the number of indexes 2 defined in the MySQL
110812 2:27:28 [ERROR] Table mydb/tblCalc contains 4 indexes inside InnoDB, which is different from the number of indexes 3 defined in the MySQL
110812 2:27:28 [ERROR] Table mydb/tblCalc contains 4 indexes inside InnoDB, which is different from the number of indexes 3 defined in the MySQL
110812 2:27:53 [ERROR] Table mydb/tblCalc contains 5 indexes inside InnoDB, which is different from the number of indexes 4 defined in the MySQL
110812 2:27:53 [ERROR] Table mydb/tblCalc contains 5 indexes inside InnoDB, which is different from the number of indexes 4 defined in the MySQL
110812 2:28:17 [ERROR] Table mydb/tblCalc contains 6 indexes inside InnoDB, which is different from the number of indexes 5 defined in the MySQL
110812 2:28:17 [ERROR] Table mydb/tblCalc contains 6 indexes inside InnoDB, which is different from the number of indexes 5 defined in the MySQL

Regards,
Aleks

UPDATE statement locks non-existent row (8 replies)

$
0
0
hi,

I'm trying to understand why the following scenario behaves differently when dealing with MySQL to what I've seen when interacting with Oracle and MS SQL Server.

I have a table with two columns, 'show index' output is as follows:

Table, Non_unique, Key_name, Seq_in_index, Column_name, Collation, Cardinality, Sub_part, Packed, Null, Index_type, Comment, Index_comment

'lock12_5', '0', 'PRIMARY', '1', 'lockid', 'A', '11348', NULL, NULL, '', 'BTREE', '', ''
'lock12_5', '0', 'PRIMARY', '2', 'lockinfo', 'A', '11348', NULL, NULL, '', 'BTREE', '', ''

Using my first MySQL DB connection I'm executing (autocommit = 0) 'update lock12_5 set lockinfo='foo' where lockid='bar' and lockinfo='foo' and checking the return value. Whenever this query returns 0 and thus the referenced row doesn't exist, if I try to insert such a row using a new DB connection (while the first transaction hasn't been commited or rolled back yet) my 'insert into lock12_5 (lockid,lockinfo) values('bar','foo') appears to be blocked.

This behaviour seems to be MySQL specific, since with both Oracle 10g and MS SQL Server 2005 my 'insert' statement in the context of a separate DB connection wasn't blocked. Is this happening in MySQL due to the default isolation level being REPEATABLE_READ and MySQL gap locking? I'm using InnoDB engine. Quoting MySQL documentation:

"For locking reads (SELECT with FOR UPDATE or LOCK IN SHARE MODE), UPDATE, and DELETE statements, locking depends on whether the statement uses a unique index with a unique search condition, or a range-type search condition. For a unique index with a unique search condition, InnoDB locks only the index record found, not the gap before it. For other search conditions, InnoDB locks the index range scanned, using gap locks or next-key (gap plus index-record) locks to block insertions by other sessions into the gaps covered by the range."

It's not quite clear to me so far as to why MySQL creates a lock on a non-existent row... I thought my 'update' query falls into the 'unique index with a unique search condition' bucket, and since 0 records are found there would be no lock...

thanks in advance for any tips/hints/clarifications
Greg

p.s.

mysql> select version();
+------------+
| version() |
+------------+
| 5.5.12-log |
+------------+

Error 139 problem (2 replies)

$
0
0
I'm trying to figure out if there's a way of getting around an SQL error. I'm trying to add a column to an existing table and I'm getting this error:

ERROR 1030 (HY000): Got error 139 from storage engine

All the reading I've done suggests that this happens when your row length exceeds 8000 bytes. I've also seen a number of posts that suggest that blobs contribute to row length, but only the prefix amount (less than 1K).

Here's my existing table:

id bigint(20) auto_increment
size bigint(20)
content longblog

The contents of this table are often very big. There's 20,000 rows, often with blobs in the megabyte range.

I'm trying to add a new column of varchar(64) to the table. What I'm seeing is that the alter request chugs away for about an hour and a half, and then craps out with the Error 139.

Am I misinterpreting the 8000 byte limit? Is the error actually being caused by something else, like resource limits?

I'm running an older MySQL -- 5.0 -- on Windows XP.

Any help would be greatly appreciated.

BC

Two question with InnoDB XA transaction (no replies)

$
0
0
I have some question with InnoDB XA transaction.

1. In the MySQL Manual, it is said that using XA transaction you have to set transaction isolation to serializable. But from my test, it do not have to. So why have to set it to serializable ?

2. If there are some distribute XA transaction runing on the MySQL server, dose the local transaction isolation need to be set as serializable ?

Info on "ERROR 27 (HY000) Can't sync XXX.frm, Errcode:9 (1 reply)

$
0
0
Problem started in other thread:

http://forums.mysql.com/read.php?22,431628,431628#msg-431628

But I've made progress, and more tables have been loaded. However, I now get a persistent error:

ERROR 27 (HY000) at line 25: Can't sync file '.\localtest\fine_factor_regression_set.frm' to disk (Errcode: 9)

"localtest" is the database I'm loading into, and "fine_factor_regression_set" is one of my tables.

Can someone point me to the documentation of this error? I see the 4-digit error codes, but not "27" or "errcode 9".

Thanks

syntax error (1 reply)

$
0
0
Hi first i think i should tell you what ive done as this is the 1st time for websites ect . I have a server and installed iis7 on it and it has a web panel .I installed a program what uses myslq it installed it but then i deleted that website and created a new one called e107 in the set up of e107 it created a database in myslq and all worked ok , Dont ask how i got this far as i dont know as im noob at it . Any way the websites running all ok but i went to check the databases in mysql command line and i get this error below .

-> SHOW DATABASES;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'HELP
SHOW DATABASES' at line 4

Can any one help me and any way a noob like me can learn more about mysql
Thanks

INNODB lock. How to resolve? (5 replies)

$
0
0
Hi,
I've a problem with MySql, some time I receive the "1205 Lock wait timeout exceeded".

Look the Innodb status get the Lock to be granted is an Index... any idea what else I must check??


SHOW INNODB STATUS show the follow:

=====================================
110822 15:45:15 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 37 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 394924, signal count 377411
Mutex spin waits 0, rounds 6840373, OS waits 97104
RW-shared spins 603206, OS waits 257034; RW-excl spins 293701, OS waits 31435
------------------------
LATEST DETECTED DEADLOCK
------------------------
110822 12:15:04
*** (1) TRANSACTION:
TRANSACTION 2 398374015, ACTIVE 0 sec, process no 2793, OS thread id 1189280064 fetching rows
mysql tables in use 1, locked 1
LOCK WAIT 140 lock struct(s), heap size 14320, 1802 row lock(s)
MySQL thread id 92014, query id 138425491 localhost 127.0.0.1 [db_name] updating
DELETE FROM `backgroundtask` WHERE ( bt_executed_at is not null and bt_result <> 'error' and bt_executed_at < '2011-08-21 10:15')
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 13326 n bits 592 index `bt_result` of table `[db_name]`.`backgroundtask` trx id 2 398374015 lock_mode X waiting
Record lock, heap no 510 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 7; hex 73756363657373; asc success;; 1: len 4; hex 00040889; asc ;;

*** (2) TRANSACTION:
TRANSACTION 2 398372478, ACTIVE 5 sec, process no 2793, OS thread id 1080637760 inserting, thread declared inside InnoDB 500
mysql tables in use 1, locked 1
43 lock struct(s), heap size 6752, 50 row lock(s), undo log entries 63
MySQL thread id 92011, query id 138425650 localhost 127.0.0.1 [db_name] update
INSERT INTO `backgroundtask` (`bt_created_at`, `bt_description`, `bt_helper`, `bt_method`, `bt_params`, `bt_group_code`, `bt_stacktrace`) VALUES ('2011-08-22 10:15', 'Dispatch order #336', 'Orderpreparation', 'dispatchOrder', 's:3:\"336\";', NULL, '[path_file] (83) : AddTask\n[path_file] (57) : dispatchOrder\n[path_file] (1272) : salesorderitem_aftersave\n[path_file] (1253) : _callObserverMethod\n[path_file] (416) : dispatchEvent\n[path_file] (42) : dispatchEvent\n[path_file]
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 0 page no 13326 n bits 592 index `bt_result` of table `[db_name]`.`backgroundtask` trx id 2 398372478 lock_mode X locks rec but not gap
Record lock, heap no 510 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 7; hex 73756363657373; asc success;; 1: len 4; hex 00040889; asc ;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 0 page no 13320 n bits 968 index `bt_result` of table `[db_name]`.`backgroundtask` trx id 2 398372478 lock_mode X locks gap before rec insert intention waiting
Record lock, heap no 5 PHYSICAL RECORD: n_fields 2; compact format; info bits 0
0: len 5; hex 6572726f72; asc error;; 1: len 4; hex 00000001; asc ;;

*** WE ROLL BACK TRANSACTION (2)
------------
TRANSACTIONS
------------
Trx id counter 2 399751060
Purge done for trx's n:o < 2 399748843 undo n:o < 0 0
History list length 15
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 0, not started, process no 2793, OS thread id 1190082880
MySQL thread id 96231, query id 146128410 localhost admin
show innodb status
---TRANSACTION 2 399751058, not started, process no 2793, OS thread id 1191889216
mysql tables in use 2, locked 0
MySQL thread id 96230, query id 146128414 localhost 127.0.0.1 [db_name]
SELECT `cataloginventory_stock_item`.*, `p`.`type_id` FROM `cataloginventory_stock_item`
INNER JOIN `catalog_product_entity` AS `p` ON product_id=p.entity_id WHERE (cataloginventory_stock_item.product_id='11792') AND (stock_id=1)
---TRANSACTION 2 399751059, not started, process no 2793, OS thread id 1193896256
MySQL thread id 96221, query id 146128415 localhost 127.0.0.1 [db_name]
SELECT `cataloginventory_stock_item`.*, `p`.`type_id` FROM `cataloginventory_stock_item`
INNER JOIN `catalog_product_entity` AS `p` ON product_id=p.entity_id WHERE (cataloginventory_stock_item.product_id='8549') AND (stock_id=1)
--------
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
4917890 OS file reads, 798462 OS file writes, 364730 OS fsyncs
78.57 reads/s, 36459 avg bytes/read, 6.49 writes/s, 5.86 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
151506 inserts, 151506 merged recs, 51417 merges
Hash table size 138401, node heap has 734 buffer(s)
17984.81 hash searches/s, 7185.83 non-hash searches/s
---
LOG
---
Log sequence number 39 826960806
Log flushed up to 39 826960806
Last checkpoint at 39 826852202
0 pending log writes, 0 pending chkp writes
309036 log i/o's done, 5.70 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 124456146; in additional pool allocated 16776448
Dictionary memory allocated 7882184
Buffer pool size 4096
Free buffers 0
Database pages 3362
Modified db pages 69
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 9936456, created 39555, written 574800
174.83 reads/s, 0.05 creates/s, 0.81 writes/s
Buffer pool hit rate 998 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 2793, id 1187072320, state: sleeping
Number of rows inserted 3185386, updated 3830696, deleted 2270357, read 1852055190
2.86 inserts/s, 1.65 updates/s, 1.62 deletes/s, 34673.63 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

Some InnoDB error in Mysql log, Pls. help! (2 replies)

$
0
0
Below is the detail:
110903 21:30:17 InnoDB: Error: the OS said file flush did not succeed
110903 21:30:17 InnoDB: Operating system error number 5 in a file operation.
InnoDB: Error number 5 means 'Input/output error'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/operating-system-error-codes.html
InnoDB: File operation call: 'flush'.
InnoDB: Cannot continue operation.

As mysql hangs up, other application depends on it also blocked, then causes system blocked. Can anyone help on this, thanks a lot !

Lock wait on INSERT using READ_COMMITTED (3 replies)

$
0
0
Using mysql v5.5.11 with innodb.

I am getting long lock waits, sometimes causing "Lock wait timeout exceeded" error, on INSERT. No deadlock so can't get the deadlock info from SHOW ENGINE INNODB STATUS. I am working to get more details on the failure scenario details, but wanted to ask a general question about innodb locking behavior.

We are using READ_COMMITTED isolation level, so there should be no gap locks, right? I'm wondering in what situation we could get lock waits on an INSERT if no gap locks used by innodb?

We are not doing any explicit locking. One condition that I can think of is a FK column in the INSERTed table, so we get locks in the FK target table for FK constraint validation. So if you INSERT from two connections and both rows reference the same FK value, you would collide on that lock.

Are there any other scenarios where you could get lock contention on INSERT using READ_COMMITTED?

Thanks,

Greg

replication master-slave issue (2 replies)

$
0
0
Hi,
I'm setting up a slave to my master mysql server.
The master was configured as a master AFTER the tables was created and information was inserted.

Up to this point, I have used percona xtrabackup to create a backup of the master, and restored it on the slave. ( I am using InnoDB tables )

I now have some difficulties replicating the data.
The slave stops at a error:

Last_SQL_Errno: 1329
Last_SQL_Error: Error 'No data - zero rows fetched, selected, or processed' on query. Default database: xxx 'UPDATE table SET column = 'yyy1' WHERE column1 = 'yyy' AND column2 = 'zzzz''


If I do a select count(*) on the affected table, the number of rows does not match.

The slave knows the pos of the master:

mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.003511 | 78921762 | | |
+------------------+----------+--------------+------------------+


mysql>show slave status\G;
Master_Log_File: mysql-bin.003511
Read_Master_Log_Pos: 78921762

How do I go ahead and solve this issue?
Also, How do I verify that the master and slave contain the same data?


best regards
Emil

Is it a good practice to mix InnoDB and MyISAM engine in a database? (4 replies)

$
0
0
Hi all,

For example, in 3NF design, with table Queue, Customer, Person as follow:

CREATE TABLE queue (
queue_date DATE NOT NULL,
queue_no TINYINT AUTO_INCREMENT NOT NULL,
customer_id INT(10) NOT NULL,
PRIMARY KEY (queue_date, queue_no)
) ENGINE=MyISAM;

CREATE TABLE customer (
customer_id INT(10) AUTO_INCREMENT NOT NULL,
person_id INT(10) NOT NULL,
credit_term TINYINT(2) NOT NULL DEFAULT '0',
PRIMARY KEY (customer_id)
) ENGINE=InnoDB;

CREATE TABLE person (
person_id INT(10) AUTO_INCREMENT NOT NULL,
...
PRIMARY KEY (person_id)
) ENGINE=InnoDB;

The problem is obvious that table queue must be MyISAM table because of primary key queue_date and queue_no.

Is it a good practice to design a database with mixture of tables of InnoDB and MyISAM?

Will this design suffer from any data integrity and/or performance issues?

Thanks for taking your time.
--
Adrian Hoe
http://adrianhoe.com/adrianhoe

Help errno: 121, Can't create table (1 reply)

$
0
0
Hello,

I am new to MySQL and I am running into errno 121, which after looking at the forums can have several possibilities.

I am using MySQL Workbench and I am receiving the errors as I try to Forward Engineer my database. I have been checking my tables, and I have not found any non-unique names, which is a common cause, and I am suspicious that it has to do with my foreign keys, but I cannot find a solution. I have set up a simple Dates table that I want to reference into any place where I need a date. In this table I need two different dates, a start and end date, so I have two foreign keys, one for start and one for end.

As a test, I tried deleting the end date, and I got the same error, only this time there was only a single foreign key, and I received the same error. Any help would be greatly appreciated, below is the message log from MySQL workbench:

Thanks in advance,
James

Executing SQL script in server
ERROR: Error 1005: Can't create table 'production_db.stage' (errno: 121)



-- -----------------------------------------------------
-- Table `Production_DB`.`Stage`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `Production_DB`.`Stage` (
`id` INT NOT NULL ,
`name` VARCHAR(45) NOT NULL ,
`description` MEDIUMTEXT NOT NULL ,
`status_id` INT NOT NULL ,
`date_start` INT NOT NULL ,
`date_end` INT NOT NULL ,
PRIMARY KEY (`id`) ,
INDEX `fk_status_id` (`status_id` ASC) ,
INDEX `fk_dateStart_id` (`date_start` ASC) ,
INDEX `fk_dateEnd_id` (`date_end` ASC) ,
UNIQUE INDEX `Stage_ID_UNIQUE` (`id` ASC) ,
CONSTRAINT `fk_status_id`
FOREIGN KEY (`status_id` )
REFERENCES `Production_DB`.`Status` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_dateStart_id`
FOREIGN KEY (`date_start` )
REFERENCES `Production_DB`.`Date` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION,
CONSTRAINT `fk_dateEnd_id`
FOREIGN KEY (`date_end` )
REFERENCES `Production_DB`.`Date` (`id` )
ON DELETE NO ACTION
ON UPDATE NO ACTION)
ENGINE = InnoDB

SQL script execution finished: statements: 8 succeeded, 1 failed

Deadlock on index of a Innodb table (4 replies)

$
0
0
Hi

We are facing deadlock on one of our innodb table. DDL of data_event table is given below.

create table data_event
( data_id INTEGER primaryKey,
node_id VARCHAR(50) primaryKey,
channel_id VARCHAR(50) not null,
transaction_id VARCHAR(1000),
batch_id INTEGER,
batched BOOLEANINT(1) not null );

create index idx_de_batchid_nodeid on (batch_id,node_id);

create index idx_de_batched_nodeid_channel on (batched,node_id,channel_id);

The column batched has two values either 0 or 1 where 0 represents that the record is not processed ( not batched ) and 1 represents it has been processed. By deafult the value of batched is 0.

For every minute, the update query will run on the data_event table to update the batched column. Insert the record into data_event table can happen at any time whenever a transaction is completed. We are facing the deadlock issue on this table as insert and update query runs at the same time. Please find the Innodb status below.

------------------------
LATEST DETECTED DEADLOCK
------------------------
110901 10:35:45
*** (1) TRANSACTION:
TRANSACTION 0 1503817595, ACTIVE 5 sec, process no 12100, OS thread id 2340395952 inserting
mysql tables in use 10, locked 10
LOCK WAIT 983 lock struct(s), heap size 77120, undo log entries 171
MySQL thread id 672, query id 1939410 10.0.65.18 posuser
insert into datasync_bo_till.data_event (node_id, data_id, channel_id, transaction_id) (select node_id, last_insert_id(), 'bo_till_item_master_channel', datasync_bo_till.fn_transaction_id() from datasync_bo_till.node c where
c.node_group_id='till' and c.sync_enabled=1 and (@sync_node_disabled is null or @sync_node_disabled != c.node_id) )
*** (1) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 223 page no 17148 n bits 376 index `idx_de_batched_nodeid_channel` of table `datasync_bo_till/data_event` trx id 0 1503817595 lock_mode X locks gap before rec insert intention waiting
Record lock, heap no 171 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032301; asc # ;;

*** (2) TRANSACTION:
TRANSACTION 0 1503817736, ACTIVE 0 sec, process no 12100, OS thread id 2340195248 fetching rows, thread declared inside InnoDB 492
mysql tables in use 1, locked 1
5 lock struct(s), heap size 1024
MySQL thread id 436, query id 1939276 localhost 10.0.65.12 root Searching rows for update
update data_event set batch_id = 91678, batched = 1 where batched = 0
and node_id = 'S007T026' and channel_id = 'bo_till_item_master_channel'
*** (2) HOLDS THE LOCK(S):
RECORD LOCKS space id 223 page no 17148 n bits 376 index `idx_de_batched_nodeid_channel` of table `datasync_bo_till/data_event` trx id 0 1503817736 lock_mode X
Record lock, heap no 82 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032307; asc # ;;

Record lock, heap no 171 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032301; asc # ;;

Record lock, heap no 187 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032302; asc # ;;

Record lock, heap no 203 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032303; asc # ;;

Record lock, heap no 219 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032304; asc # ;;

Record lock, heap no 235 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032305; asc # ;;

Record lock, heap no 251 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032306; asc # ;;

Record lock, heap no 274 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032308; asc # ;;

Record lock, heap no 290 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 80032309; asc # ;;

*** (2) WAITING FOR THIS LOCK TO BE GRANTED:
RECORD LOCKS space id 223 page no 17148 n bits 376 index `idx_de_batched_nodeid_channel` of table `datasync_bo_till/data_event` trx id 0 1503817736 lock_mode X waiting
Record lock, heap no 164 PHYSICAL RECORD: n_fields 4; compact format; info bits 0
0: len 2; hex 8000; asc ;; 1: len 8; hex 5330303754303236; asc S007T026;; 2: len 27; hex 626f5f74696c6c5f6974656d5f6d61737465725f6368616e6e656c; asc bo_till_item_master_channel;; 3: len 4; hex 8003230a; asc # ;;

*** WE ROLL BACK TRANSACTION (2)

Can anyone help us out to find the way to overcome the deadlock?

How to restore innoDB tables without ibdata1 with innodb_file_per_table=1 (2 replies)

$
0
0
Hello....

We backed up the database directory with .frm and .ibd files. The ibdata1 file is lost. In the config there is innodb_file_per_table=1. This means the data should be in the directory... Copy the directory and start mysql didn't work (see the log at the end).


Is there a possibility to restore the database?


Thank for your help

Working with: 5.1.40 (5.1.40-community-log, Win32)


110913 8:41:44 [Note] Plugin 'FEDERATED' is disabled.
110913 8:41:46 InnoDB: Started; log sequence number 0 1698675883
110913 8:41:46 [Note] Event Scheduler: Loaded 0 events
110913 8:41:46 [Note] C:\M2011\MySQL-Prog\bin32\mysqld.exe: ready for connections.
Version: '5.1.40-community-log' socket: '' port: 3306 MySQL Community Server (GPL)
InnoDB: Error: tablespace id is 941 in the data dictionary
InnoDB: but in file .\fib00001\d_lsvlauf_pos.ibd it is 161!
110913 8:42:09 InnoDB: Assertion failure in thread 6132 in file .\fil\fil0fil.c line 603
InnoDB: Failing assertion: 0
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-recovery.html
InnoDB: about forcing recovery.
110913 8:42:09 - mysqld got exception 0xc0000005 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=8384512
read_buffer_size=131072
max_used_connections=1
max_threads=200
threads_connected=1
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 444647 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0xbd04db0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
005E214D mysqld.exe!?check_next_symbol@Gis_read_stream@@QAE_ND@Z()
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0BD53D60=SHOW TABLE STATUS FROM `fib00001`
thd->thread_id=2
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
InnoDB: Thread 448 stopped in file .\os\os0sync.c line 574
InnoDB: Thread 3804 stopped in file .\os\os0sync.c line 271

InnoDB-total number of locks exceeds lock table size (1 reply)

$
0
0
I've recently converted our engine from MyIsam to InnoDB for performance reasons. We have about 800 tables distributed into four DB's with a total ibdata1 size of about 300GB.
I checked the config for table locks and it is set for about 8 million or so. Is there any magic solution to this? We run Drupal on Ubuntu and our MySql version is 5.0.75 (64 bit 16 core 24GB RAM).

Ideas? Suggestions? Appreciated.

Thanks

Innodb Configuration (no replies)

$
0
0
Hello everyone

I have a question and i need some help. I have a really big database and it's taking A LOT of time to dump it, so i want to make some changes to my.cnf. The engine is innodb and i know that with innodb must be relly careful when trying to play with the vaiables. I have an ibdata1 of 10MB and 2 ib_logfiles of 5MB (default setup). How should i proceed in order not to destroy my database
Thanks in advance

1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1 (no replies)

$
0
0
<?php
function display_content($link,$from=0)
{
$sql="select * from bkc_table order by date desc limit $from,10";
$result=mysql_query($sql,$link);
if(!$result){
echo mysql_errno($link).":".mysql_error($link);
}
$msgnum=mysql_num_rows($result);
for($i=0;$i<$msgnum;$i++){
$row=mysql_fetch_array($result,$link);
?>
<tr <? if($i%2==0) echo 'bgcolor="#CCCCCC"' ; else echo 'bgcolor="#99CCFF"';?>><td width=20%><?

echo"<img src=images/$row[phopo].JPG>";
echo"<td width=80% bgcolor=#CCCCCC >貨物種類:$row[species]&nbsp;&nbsp;&nbsp;
貨物主用料:$row[material]&nbsp;&nbsp;&nbsp;
貨物主顏色:$row[color]&nbsp;&nbsp;&nbsp;
貨物長闊高:$row[size]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
價錢:$row[sellmoney]&nbsp;&nbsp;&nbsp;</td>";
echo"</tr>";}}


?>



who can help me??
1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\bdb_func.php on line 9

1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10' at line 1 (-1 replies)

Viewing all 1954 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>