distal-attribute
distal-attribute
distal-attribute
distal-attribute

Help ! Can't create Table

User, date Message
Written by Thotheolh
7 years ago
Category: General
4 posts since Sun, 29 Jul 07
I am doing a programming project and my group mate sent me the .sql database file to me and I open HeidiSQL and did the Import>Load SQL files but it says that:

CREATE TABLE /*!32312 IF NOT EXISTS*/ `booking_info` ( `BOOKING_ID` int(11) NOT NULL, `FLIGHT_ID` int(11) default NULL, `PASSPORT_NUMBER` varchar(50) default NULL, `BOOKED_DATETIME` datetime default NULL, `STAFF_BOOKED` varchar(50) default NULL, `SEAT_NUMBER` int(15) default NULL, `PASSENGER_NAME` varchar(50) default NULL, PRIMARY KEY (`BOOKING_ID`), KEY `FLIGHT_ID_FK` (`FLIGHT_ID`), CONSTRAINT `FLIGHT_ID_FK` FOREIGN KEY (`FLIGHT_ID`) REFERENCES `flight_info` (`FLIGHT_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
/* SQL Error: Can't create table '.\bookingsystem\booking_info.frm' (errno: 150) */

I don't noticed anything wrong with the syntax. What does errno: 150 mean ?

How should I solve it ?
Written by ansgar
7 years ago
5045 posts since Fri, 07 Apr 06
There is no problem with the executed SQL. You have a problem on the servers filesystem, as the message says it can't create the .frm file somehow. You should contact the system administrator of that server.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
I have the same problem with http://changes.heidisql.com/3621. I tried to import SQL-script, generated with HeidiSQL, using mysql command prompt:


mysql --character-sets-dir=../share/charsets --default-character-set=utf8 -uroot -p%2 -P%3 mysql < "%1"


where
%1 - path to sql-file
%2 - user's password
%3 - mysql server's port

All works fine.
But HeidiSQL can't do that.
There is one exception between these two variants. When using command prompt and mysql.exe I added `create database ...;` and `use ...;` lines to sql-file. But I don't think it will change the behaviour.
I can post sql-script which leads to problems.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06

sh2ka wrote: But HeidiSQL can't do that.


What exactly? Is there some error message?
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Else some info: I tried sql-file generated with HeidiSQL and generated with mysqldump (i.e. 4 combinations:
* HeidiSQL export - HeidiSQL import (doesn't work)
* mysqldump - HeidiSQL import (doesn't work)
* mysqldump - mysql (works fine)
* HeidiSQL export - mysql (works fine)
)

That is HeidiSQL export works fine, but HeidiSQL import - doesn't.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Yes, the same as Thotheolh has - Can't create table ... .frm' (errno: 150). And it says: Foreign key constraint is incorrectly formed.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Here is sql-file code sample:


# --------------------------------------------------------
# Host: 127.0.0.1
# Server version: 5.0.67-community-nt
# Server OS: Win32
# HeidiSQL version: 5.1.0.3595
# Date/time: 2010-11-29 15:39:29
# --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

# Dumping structure for procedure weight_server.common_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_delete`(IN `table_name` TEXT, IN `filter` TEXT)
COMMENT 'Обобщенная процедура удаления данных'
BEGIN
CALL query_exec(query_build(CONCAT('DELETE FROM ', table_name), filter, ''));
END//
DELIMITER ;


# Dumping structure for procedure weight_server.common_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_get`(IN `table_names` TEXT, IN `column_names` TEXT, IN `filter` TEXT, IN `options` TEXT)
COMMENT 'Обобщенная процедура получения данных'
BEGIN
CALL query_exec(query_build(CONCAT('SELECT ', column_names, ' FROM ', table_names), filter, options));
END//
DELIMITER ;


# Dumping structure for procedure weight_server.common_update
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_update`(IN `table_name` TEXT, IN `value_list` TEXT, IN `filter` TEXT)
COMMENT 'Обобщенная процедура обновления данных'
BEGIN
CALL query_exec(query_build(CONCAT('UPDATE ', table_name, ' SET ', value_list), filter, ''));
END//
DELIMITER ;

# Dumping structure for table weight_server.devices
CREATE TABLE IF NOT EXISTS `devices` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор устройства',
`name` varchar(255) NOT NULL COMMENT 'Имя устройства',
`device_type` text NOT NULL COMMENT 'Тип устройства (vkt_6, vvts_4, ...)',
`config` text COMMENT 'Настройки устройства',
`id_device_group` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы устройств',
`description` text COMMENT 'Описание устройства',
PRIMARY KEY (`id`),
UNIQUE KEY `Index_2` (`name`),
KEY `devices_ibfk_1` (`id_device_group`),
CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`id_device_group`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='Таблица устройств';



Table `devices` didn't created because of this problem.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Did you try the above script? I don't - understand is it a bug or I make something wrong?
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
The above mentioned foreign key expects the non existant table "device_groups". I even do not get errors here but I guess that's because I have disabled InnoDB and MySQL ignores foreign key clauses here.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
And how to do? HeidiSQL exports tables in this order (`devices` table exported earlier than `device_groups`)! But it (HeidiSQL) can't import generated script to database. I think it must be simpler: if database export completed without errors - import must be completed without errors too.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
> `devices` table exported earlier than `device_groups`

No, device_group is nowhere in your dump.

Order of exported tables does not matter in this case, as HeidiSQL surrounds the export with

SET FOREIGN_KEY_CHECKS=0;
...
SET FOREIGN_KEY_CHECKS=1;

Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Yes, I removed another part of script because it's too big.


Order of exported tables does not matter in this case, as HeidiSQL surrounds the export with


SET FOREIGN_KEY_CHECKS=0;
...
SET FOREIGN_KEY_CHECKS=1;




But why import fails and what I need to do in this case? May be because of different code at third line beginning:


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
Hm, sorry, SET FOREIGN_KEY_CHECKS=0 is of course not the whole relevant code. Your code looks ok.

You could update your HeidiSQL, it's about 30 changes behind. Though I guess that doesn't make a difference.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Thanks! Looks like the 3626 revision works fine. And, well, this MySQL client is the best for me.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
Phew, lucky me that problem is fixed. :)
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Hi! I catched the same problem. Here is my full script to import:

# --------------------------------------------------------
# Host: 127.0.0.1
# Server version: 5.0.67-community-nt
# Server OS: Win32
# HeidiSQL version: 5.1.0.3595
# Date/time: 2011-01-12 16:12:36
# --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

# Dumping structure for procedure device_server.common_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_delete`(IN `table_name` TEXT, IN `filter` TEXT)
COMMENT 'Обобщенная процедура удаления данных'
BEGIN
CALL query_exec(query_build(CONCAT('DELETE FROM ', table_name), filter, ''));
END//
DELIMITER ;


# Dumping structure for procedure device_server.common_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_get`(IN `table_names` TEXT, IN `column_names` TEXT, IN `filter` TEXT, IN `options` TEXT)
COMMENT 'Обобщенная процедура получения данных'
BEGIN
CALL query_exec(query_build(CONCAT('SELECT ', column_names, ' FROM ', table_names), filter, options));
END//
DELIMITER ;


# Dumping structure for procedure device_server.common_update
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_update`(IN `table_name` TEXT, IN `value_list` TEXT, IN `filter` TEXT)
COMMENT 'Обобщенная процедура обновления данных'
BEGIN
CALL query_exec(query_build(CONCAT('UPDATE ', table_name, ' SET ', value_list), filter, ''));
END//
DELIMITER ;


# Dumping structure for table device_server.devices
CREATE TABLE IF NOT EXISTS `devices` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор устройства',
`name` varchar(255) NOT NULL COMMENT 'Имя устройства',
`device_type` text NOT NULL COMMENT 'Тип устройства (vkt_6, vvts_4, ...)',
`config` text COMMENT 'Настройки устройства',
`device_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы устройств',
`description` text COMMENT 'Описание устройства',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `devices_ibfk_1` (`device_group_id`),
CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Таблица устройств';

# Dumping data for table device_server.devices: ~2 rows (approximately)
/*!40000 ALTER TABLE `devices` DISABLE KEYS */;
INSERT INTO `devices` (`id`, `name`, `device_type`, `config`, `device_group_id`, `description`) VALUES
(2, 'Кран 23 (24)', 'ВKT "КОВШ" 6', '', 2, ''),
(3, 'Кран 23', 'ВKT "КОВШ" 6', '<DeviceConfig waitTimeout="1000" curStateUpdatePeriod="50" maxFailCount="3" maxRepeatCount="3" address="2" type="vkt-6"/>\n', 3, '');
/*!40000 ALTER TABLE `devices` ENABLE KEYS */;


# Dumping structure for procedure device_server.devices_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_add`(IN `device_name` TEXT, IN `device_type` TEXT, IN `group_name` TEXT, IN `config` TEXT, IN `description` TEXT)
COMMENT 'Добавить устройство'
BEGIN
# переменные
DECLARE exists_in_group TEXT DEFAULT '';
DECLARE exists_in_server TEXT DEFAULT '';
DECLARE group_id INT DEFAULT 0;
DECLARE rec_id INT DEFAULT 0;

# блок обработки исключения
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении устройства `', device_name, '` в группу устройств `', group_name, '`'));
END;

# тело процедуры
START TRANSACTION;

proc_body: BEGIN
# не разрешаем пустое имя устройства
IF(is_string_empty(device_name)) THEN
CALL return_fail('Не указано имя устройства');
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(devices_get_id(device_name) != 0) THEN
SELECT
device_groups.name,
device_groups.server_name
INTO
exists_in_group,
exists_in_server
FROM
device_groups,
devices
WHERE
device_groups.id = devices.device_group_id AND
devices.name = device_name;

CALL return_fail(CONCAT('Устройство `', device_name, '` уже существует в группе `', exists_in_group, '` сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;

# не разрешаем пустой тип устройства
IF(is_string_empty(device_type)) THEN
CALL return_fail('Не указан тип устройства!');
LEAVE proc_body;
END IF;

# не разрешаем пустое имя группы
IF(is_string_empty(group_name)) THEN
CALL return_fail('Не указана группа устройств!');
LEAVE proc_body;
END IF;

SELECT device_groups_get_id(group_name) INTO group_id;

# не разрешаем добавлять устройства в несуществующие группы
IF(group_id = 0) THEN
CALL return_fail(CONCAT('Группа устройств `', group_name, '` не существует!'));
LEAVE proc_body;
END IF;

INSERT INTO
devices
(
name,
device_type,
device_group_id,
config,
description
)
VALUES
(
device_name,
device_type,
group_id,
config,
description
);

SELECT LAST_INSERT_ID() INTO rec_id;

INSERT INTO device_locks (device_id) VALUES (rec_id);
INSERT INTO device_states (device_id) VALUES (rec_id);
INSERT INTO tcwcurdata (TCW_ID) VALUES (rec_id);
INSERT INTO tcwconfig (TCW_ID, TCW_NAME) VALUES (rec_id, device_name);

CALL return_ok(rec_id);

END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete`(IN `device_name` TEXT)
COMMENT 'Удалить устройство'
BEGIN
DELETE FROM devices WHERE devices.name = device_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_delete_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete_all`()
COMMENT 'Удалить все устройства'
BEGIN
DELETE FROM devices;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_delete_from_group
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete_from_group`(IN `group_name` TEXT)
COMMENT 'Удалить все устройства группы'
BEGIN
DELETE
devices
FROM
devices,
device_groups
WHERE
devices.device_group_id = device_groups.id AND
device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get`(IN `device_name` TEXT)
COMMENT 'Вернуть устройства'
BEGIN
SELECT
*
FROM
devices
WHERE
devices.name = device_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_get_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get_all`()
COMMENT 'Вернуть все устройства'
BEGIN
SELECT * FROM devices;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_get_for_group
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get_for_group`(IN `group_name` TEXT)
COMMENT 'Вернуть устройства указанной группы'
BEGIN
SELECT
devices.*
FROM
devices,
device_groups
WHERE
device_groups.id = devices.device_group_id AND
device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for function device_server.devices_get_id
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `devices_get_id`(`device_name` TEXT) RETURNS int(11)
COMMENT 'Вернуть идентификатор устройства'
BEGIN
DECLARE rec_id INT DEFAULT 0;
SELECT id INTO rec_id FROM devices WHERE devices.name = device_name LIMIT 1;
RETURN rec_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_rename
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_rename`(IN `old_name` TEXT, IN `new_name` TEXT)
COMMENT 'Переименовать устройство'
BEGIN
DECLARE exists_in_group TEXT DEFAULT '';
DECLARE exists_in_server TEXT DEFAULT '';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при переименовании устройства из `', old_name, '` в ', new_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# запрещаем пустое новое имя устройства
IF(is_string_empty(new_name)) THEN
CALL return_fail(CONCAT('Не указано новое имя устройства'));
LEAVE proc_body;
END IF;

# запрещаем дубликаты
IF(devices_get_id(new_name) != 0) THEN
SELECT
device_groups.name,
device_groups.server_name
INTO
exists_in_group,
exists_in_server
FROM
device_groups,
devices
WHERE
device_groups.id = devices.device_group_id AND
devices.name = new_name;

CALL return_fail(CONCAT('Устройство `', new_name, '` уже существует в группе устройств `', exists_in_group, '` сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;

# запрещаем пустое исходное имя устройства
IF(is_string_empty(old_name)) THEN
CALL return_fail(CONCAT('Не указано исходное имя устройства'));
LEAVE proc_body;
END IF;

UPDATE devices SET name = new_name WHERE name = old_name;

CALL return_ok(CONCAT('Устройство успешно переименовано с `', old_name, '` на `', new_name, '`!'));
END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.devices_set_config
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_set_config`(IN `device_name` TEXT, IN `config` TEXT)
COMMENT 'Изменить настройки устройства'
BEGIN
UPDATE devices SET devices.config = config WHERE devices.name = device_name;
END//
DELIMITER ;


# Dumping structure for table device_server.device_control
CREATE TABLE IF NOT EXISTS `device_control` (
`id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Уникальный идентификатор команды (для сохранения очередности команд)',
`device_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор устройства',
`client_name` text NOT NULL COMMENT 'Уникальный идентификатор клиента, вызвавшего команду',
`command` text NOT NULL COMMENT 'XML дерево с командой и ее параметрами',
`response` text COMMENT 'XML дерево с ответом на команду',
PRIMARY KEY (`id`),
KEY `FK_device_control_devices` (`device_id`),
CONSTRAINT `FK_device_control_devices` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=623 DEFAULT CHARSET=utf8 COMMENT='Таблица управления устройствами';

# Dumping data for table device_server.device_control: ~0 rows (approximately)
/*!40000 ALTER TABLE `device_control` DISABLE KEYS */;
/*!40000 ALTER TABLE `device_control` ENABLE KEYS */;


# Dumping structure for procedure device_server.device_control_check_removed
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_check_removed`(IN `cmd_id` BIGINT)
COMMENT 'Проверить удалена ли запись команды'
BEGIN
DELETE FROM device_control WHERE device_control.id = cmd_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_control_delete_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_delete_all`(IN `server_name` TEXT)
COMMENT 'Удалить все команды для устройств указанного весового сервера'
BEGIN
DELETE
device_control
FROM
device_control,
devices,
device_groups
WHERE
device_groups.server_name = server_name AND
devices.device_group_id = device_groups.id AND
device_control.device_id = devices.id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_control_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_get`(IN `cmd_id` BIGINT)
COMMENT 'Получить указанную запись команды'
BEGIN
SELECT * FROM device_control WHERE device_control.id = cmd_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_control_get_command
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_get_command`(IN `device_name` TEXT)
COMMENT 'Вернуть очередную команду для указанного устройства'
BEGIN
SELECT
device_control.*
FROM
device_control,
devices
WHERE
device_control.device_id = devices.id AND
devices.name = device_name AND
device_control.response IS NULL
ORDER BY id LIMIT 1;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_control_send_command
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_send_command`(IN `device_name` TEXT, IN `client_name` TEXT, IN `command` TEXT)
COMMENT 'Добавить команду указанному устройству'
BEGIN
DECLARE device_id INT DEFAULT 0;
DECLARE cmd_id INT DEFAULT 0;

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении команды `', command, '` устройству `', device_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя устройства
IF(is_string_empty(device_name)) THEN
CALL return_fail('Передано пустое имя устройства');
LEAVE proc_body;
END IF;

SELECT devices_get_id(device_name) INTO device_id;

# не разрешаем несуществующие устройства
IF(device_id = 0) THEN
CALL return_fail(CONCAT('Указано несуществующее устройство `', device_name, '`'));
LEAVE proc_body;
END IF;

# проверяем наличие этой команды от этого клиента в очереди
SELECT
id
INTO
cmd_id
FROM
device_control
WHERE
device_control.device_id = device_id AND
device_control.client_name = client_name AND
device_control.command = command AND
device_control.response IS NULL
LIMIT 1;

# не разрешаем посылать несколько одинаковых команд
IF(cmd_id != 0) THEN
CALL return_ok(cmd_id);
LEAVE proc_body;
END IF;

INSERT INTO
device_control (device_id, client_name, command)
VALUES
(device_id, client_name, command);

CALL return_ok(LAST_INSERT_ID());

END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_control_send_response
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_control_send_response`(IN `cmd_id` BIGINT, IN `response` TEXT)
COMMENT 'Отправить ответ на команду'
BEGIN
UPDATE device_control SET device_control.response = response WHERE device_control.id = cmd_id;
END//
DELIMITER ;


# Dumping structure for table device_server.device_groups
CREATE TABLE IF NOT EXISTS `device_groups` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор группы устройств',
`name` varchar(255) NOT NULL COMMENT 'Имя группы устройств',
`group_type` text NOT NULL COMMENT 'Тип группы устройств (masters, slaves)',
`server_name` text NOT NULL COMMENT 'Уникальный идентификатор сервера, к которому подключено устройство',
`description` text COMMENT 'Описание группы устройств',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Таблица групп устройств';

# Dumping data for table device_server.device_groups: ~2 rows (approximately)
/*!40000 ALTER TABLE `device_groups` DISABLE KEYS */;
INSERT INTO `device_groups` (`id`, `name`, `group_type`, `server_name`, `description`) VALUES
(2, 'Пролет 1 (24)', 'Мастер-устройства', 'vesprom-24', ''),
(3, 'Тест', 'Мастер-устройства', 'VESPROM-2', '');
/*!40000 ALTER TABLE `device_groups` ENABLE KEYS */;


# Dumping structure for procedure device_server.device_groups_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_add`(IN `group_name` TEXT, IN `group_type` TEXT, IN `server_name` TEXT, IN `description` TEXT)
COMMENT 'Добавить группу устройств'
BEGIN
DECLARE exists_in_server TEXT DEFAULT '';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении группы устройств `', group_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя группы устройств
IF(is_string_empty(group_name)) THEN
CALL return_fail(CONCAT('Не указано имя группы устройств'));
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(device_groups_get_id(group_name) != 0) THEN
SELECT
device_groups.server_name INTO exists_in_server
FROM
device_groups
WHERE
device_groups.name = group_name;

CALL return_fail(CONCAT('Группа устройств `', group_name, '` уже существует у сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;

# не разрешаем пустой тип группы
IF(is_string_empty(group_type)) THEN
CALL return_fail('Не указан тип группы!');
LEAVE proc_body;
END IF;

# не разрешаем пустое имя компьютера весового сервера
IF(is_string_empty(server_name)) THEN
CALL return_fail('Не указано имя компьютера весового сервера!');
LEAVE proc_body;
END IF;

INSERT INTO
device_groups (name, group_type, server_name, description)
VALUES
(group_name, group_type, server_name, description);

CALL return_ok(LAST_INSERT_ID());

END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_delete`(IN `group_name` TEXT)
COMMENT 'Удалить группу устройств'
BEGIN
DELETE FROM device_groups WHERE device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_delete_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_delete_all`()
COMMENT 'Удалить все группы устройств'
BEGIN
DELETE FROM device_groups;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_delete_for_server
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_delete_for_server`(IN `server_name` TEXT)
COMMENT 'Удалить все группы весового сервера'
BEGIN
DELETE FROM device_groups WHERE device_groups.server_name = server_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_get`(IN `group_name` TEXT)
COMMENT 'Вернуть группу устройств'
BEGIN
SELECT * FROM device_groups WHERE device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_get_for_server
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_get_for_server`(IN `server_name` TEXT)
COMMENT 'Вернуть группы устройств указанного весового сервера'
BEGIN
SELECT * FROM device_groups WHERE device_groups.server_name = server_name;
END//
DELIMITER ;


# Dumping structure for function device_server.device_groups_get_id
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `device_groups_get_id`(`group_name` TEXT) RETURNS int(11)
COMMENT 'Вернуть идентификатор группы устройств'
BEGIN
DECLARE rec_id INT DEFAULT 0;
SELECT id INTO rec_id FROM device_groups WHERE device_groups.name = group_name LIMIT 1;
RETURN rec_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_groups_rename
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_groups_rename`(IN `old_name` TEXT, IN `new_name` TEXT)
COMMENT 'Переименовать группу устройств'
BEGIN
DECLARE exists_in_server TEXT DEFAULT '';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при переименовании группы устройств `', old_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя группы устройств
IF(is_string_empty(new_name)) THEN
CALL return_fail(CONCAT('Не указано имя группы устройств'));
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(device_groups_get_id(new_name) != 0) THEN
SELECT device_groups.server_name INTO exists_in_server
FROM device_groups
WHERE device_groups.name = new_name;

CALL return_fail(CONCAT('Группа устройств `', new_name, '` уже существует у сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;


UPDATE device_groups SET name = new_name WHERE name = old_name;
CALL return_ok(CONCAT('Группа устройств успешно переименована с `', old_name, '` на `', new_name, '`!'));
END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for table device_server.device_locks
CREATE TABLE IF NOT EXISTS `device_locks` (
`device_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор устройства',
`client_name` text COMMENT 'Уникальный идентификатор клиента',
`user_name` text COMMENT 'Пользователь, работающий с весами',
`time_stamp` datetime default NULL COMMENT 'Время последнего обновления записи.',
KEY `device_id` (`device_id`),
CONSTRAINT `device_locks_ibfk_1` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица блокировки устройств (deprecated)';

# Dumping data for table device_server.device_locks: ~2 rows (approximately)
/*!40000 ALTER TABLE `device_locks` DISABLE KEYS */;
INSERT INTO `device_locks` (`device_id`, `client_name`, `user_name`, `time_stamp`) VALUES
(2, NULL, NULL, NULL),
(3, NULL, NULL, NULL);
/*!40000 ALTER TABLE `device_locks` ENABLE KEYS */;


# Dumping structure for table device_server.device_states
CREATE TABLE IF NOT EXISTS `device_states` (
`device_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор устройства',
`state` text COMMENT 'Текущее состояние устройства',
`last_update_time` datetime default NULL COMMENT 'Время последнего обновления записи',
UNIQUE KEY `device_id` (`device_id`),
CONSTRAINT `device_states_ibfk_1` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица состояния устройств';

# Dumping data for table device_server.device_states: ~2 rows (approximately)
/*!40000 ALTER TABLE `device_states` DISABLE KEYS */;
INSERT INTO `device_states` (`device_id`, `state`, `last_update_time`) VALUES
(2, '<curState valid="0"/>\n', '2010-12-29 16:21:07'),
(3, '<curState valid="0"/>\n', '2011-01-12 10:24:52');
/*!40000 ALTER TABLE `device_states` ENABLE KEYS */;


# Dumping structure for procedure device_server.device_states_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_states_get`(IN `device_name` TEXT)
COMMENT 'Получить текущее состояние устройства'
BEGIN
SELECT
device_states.*,
(TIMESTAMPDIFF(SECOND, device_states.last_update_time, NOW()) < 5) AS connected
FROM
device_states,
devices
WHERE
device_states.device_id = devices.id AND
devices.name = device_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.device_states_update
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `device_states_update`(IN `device_name` TEXT, IN `state` TEXT)
COMMENT 'Обновить текущие показания устройства'
BEGIN
UPDATE
device_states,
devices
SET
device_states.state = state,
device_states.last_update_time = NOW()
WHERE
device_states.device_id = devices.id AND
devices.name = device_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.fill_initial_data
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `fill_initial_data`()
COMMENT 'Заполнить базу данными по умолчанию'
BEGIN
# очищаем таблицы
DELETE FROM device_control;
DELETE FROM device_groups;
DELETE FROM device_locks;
DELETE FROM device_states;
DELETE FROM tcwconfig;
DELETE FROM tcwcurdata;
DELETE FROM devices;
DELETE FROM policies;
DELETE FROM ports;
DELETE FROM user_groups;
DELETE FROM user_groups_devices;
DELETE FROM user_groups_policies;
DELETE FROM users;
DELETE FROM weight_archive;

# сбрасываем генераторы идентификаторов записей
ALTER TABLE device_control AUTO_INCREMENT=0;
ALTER TABLE device_groups AUTO_INCREMENT=0;
ALTER TABLE device_locks AUTO_INCREMENT=0;
ALTER TABLE device_states AUTO_INCREMENT=0;
ALTER TABLE devices AUTO_INCREMENT=0;
ALTER TABLE policies AUTO_INCREMENT=0;
ALTER TABLE ports AUTO_INCREMENT=0;
ALTER TABLE user_groups AUTO_INCREMENT=0;
ALTER TABLE user_groups_devices AUTO_INCREMENT=0;
ALTER TABLE user_groups_policies AUTO_INCREMENT=0;
ALTER TABLE users AUTO_INCREMENT=0;
ALTER TABLE weight_archive AUTO_INCREMENT=0;
ALTER TABLE tcwconfig AUTO_INCREMENT=0;
ALTER TABLE tcwcurdata AUTO_INCREMENT=0;

# заполняет данными по умолчанию
INSERT INTO user_groups (name, group_type, description)
VALUES ('Администраторы', 'system', 'Группа пользователей с максимальным доступом');

INSERT INTO users (name, passw, user_group_id, user_type, description)
VALUES ('Администратор','2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', user_groups_get_id('Администраторы'), 'system', 'Системная учетная запись');

/* INSERT INTO policies (name, description)
VALUES ('weight_server_control', 'Управление весовым сервером');*/
END//
DELIMITER ;


# Dumping structure for procedure device_server.fill_test_data
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `fill_test_data`()
COMMENT 'Заполнить базу тестовыми данными'
BEGIN

CALL fill_initial_data();


CALL user_groups_add('Операторы', NULL);


CALL users_add('Иванов И.И.', '2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', NULL);
CALL users_add('Петров П.П.', '2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', 'Операторы');
CALL users_add('Сидоров С.С.', '2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', 'Операторы');
CALL users_add('Михалыч', '2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', 'Администраторы');


CALL device_groups_add('Пролет 1', "Мастер-устройства", 'КЦ-2', NULL);
CALL device_groups_add('Пролет 2', "Мастер-устройства", 'КЦ-2', NULL);
CALL device_groups_add('Пролет 3', "Слейв-устройства", 'КЦ-2', NULL);


CALL devices_add('Устройство 1', 'vkt_6', 'Пролет 1', NULL, NULL);
CALL devices_add('Устройство 2', 'vkt_6', 'Пролет 1', NULL, NULL);
CALL devices_add('Устройство 3', 'vkt_6', 'Пролет 2', NULL, NULL);


CALL ports_add('Порт 1', 'serial', 'Пролет 1', NULL, NULL);
CALL ports_add('Порт 2', 'serial', 'Пролет 1', NULL, NULL);
CALL ports_add('Порт 3', 'serial', 'Пролет 2', NULL, NULL);
END//
DELIMITER ;


# Dumping structure for function device_server.is_string_empty
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `is_string_empty`(`value` TEXT) RETURNS tinyint(1)
COMMENT 'Пустая ли строка'
BEGIN
RETURN value IS NULL OR value = '';
END//
DELIMITER ;


# Dumping structure for table device_server.policies
CREATE TABLE IF NOT EXISTS `policies` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор опции',
`name` varchar(255) NOT NULL COMMENT 'Название опции',
`description` text COMMENT 'Описание опции',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица прав пользователя';

# Dumping data for table device_server.policies: ~0 rows (approximately)
/*!40000 ALTER TABLE `policies` DISABLE KEYS */;
/*!40000 ALTER TABLE `policies` ENABLE KEYS */;


# Dumping structure for table device_server.ports
CREATE TABLE IF NOT EXISTS `ports` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор порта',
`name` varchar(255) NOT NULL COMMENT 'Имя порта',
`port_type` text NOT NULL COMMENT 'Тип порта (serial, usb, ethernet)',
`config` text COMMENT 'Настройки порта',
`device_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы устройств',
`description` text COMMENT 'Описание порта',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `ports_ibfk_1` (`device_group_id`),
CONSTRAINT `ports_ibfk_1` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='Таблица портов';

# Dumping data for table device_server.ports: ~4 rows (approximately)
/*!40000 ALTER TABLE `ports` DISABLE KEYS */;
INSERT INTO `ports` (`id`, `name`, `port_type`, `config`, `device_group_id`, `description`) VALUES
(2, 'ШСв 1 (24)', 'Последовательный порт', '<PortConfig stopBits="1" portName="COM4" type="serial" dataBits="8 bit" baudRate="9600 baud" parity="None"/>\n', 2, ''),
(3, 'ШСв 2', 'Последовательный порт', '<PortConfig stopBits="1" portName="COM1" type="serial" dataBits="8 bit" baudRate="9600 baud" parity="None"/>\n', 2, ''),
(6, 'Тест 1', 'Последовательный порт', '<PortConfig stopBits="1" portName="COM5" type="serial" dataBits="8 bit" baudRate="9600 baud" parity="None"/>\n', 3, ''),
(8, 'Тест 2', 'Последовательный порт', '<PortConfig stopBits="1" portName="COM4" type="serial" dataBits="8 bit" baudRate="9600 baud" parity="None"/>\n', 3, '');
/*!40000 ALTER TABLE `ports` ENABLE KEYS */;


# Dumping structure for procedure device_server.ports_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_add`(IN `port_name` TEXT, IN `port_type` TEXT, IN `group_name` TEXT, IN `config` TEXT, IN `description` TEXT)
COMMENT 'Добавить порт'
BEGIN
DECLARE exists_in_group TEXT DEFAULT '';
DECLARE exists_in_server TEXT DEFAULT '';
DECLARE group_id INT DEFAULT 0;

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении порта `', port_name, '` в группу устройств `', group_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя порта
IF(is_string_empty(port_name)) THEN
CALL return_fail('Не указано имя порта');
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(ports_get_id(port_name) != 0) THEN
SELECT
device_groups.name,
device_groups.server_name
INTO
exists_in_group,
exists_in_server
FROM
device_groups,
ports
WHERE
device_groups.id = ports.device_group_id AND
ports.name = port_name;

CALL return_fail(CONCAT('Порт `', port_name, '` уже существует в группе устройств `', exists_in_group, '` сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;

# не разрешаем пустой тип порта
IF(is_string_empty(port_type)) THEN
CALL return_fail('Не указан тип порта!');
LEAVE proc_body;
END IF;

# не разрешаем пустое имя группы
IF(is_string_empty(group_name)) THEN
CALL return_fail('Не указана группа устройств!');
LEAVE proc_body;
END IF;

SELECT device_groups_get_id(group_name) INTO group_id;

# не разрешаем добавлять порты в несуществующие группы
IF(group_id = 0) THEN
CALL return_fail(CONCAT('Группа устройств `', group_name, '` не существует!'));
LEAVE proc_body;
END IF;

INSERT INTO
ports
(
name,
port_type,
device_group_id,
config,
description
)
VALUES
(
port_name,
port_type,
group_id,
config,
description
);

CALL return_ok(LAST_INSERT_ID());

END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_delete`(IN `port_name` TEXT)
COMMENT 'Удалить порт'
BEGIN
DELETE FROM ports WHERE ports.name = port_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_delete_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_delete_all`()
COMMENT 'Удалить все порты'
BEGIN
DELETE FROM ports;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_delete_from_group
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_delete_from_group`(IN `group_name` TEXT)
COMMENT 'Удалить все порты группы устройств'
BEGIN
DELETE FROM ports WHERE ports.device_group_id = device_groups.id AND device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_get`(IN `port_name` TEXT)
COMMENT 'Вернуть порты'
BEGIN
SELECT * FROM ports WHERE ports.name = port_name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_get_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_get_all`()
COMMENT 'Вернуть все порты'
BEGIN
SELECT * FROM ports;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_get_for_group
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_get_for_group`(IN `group_name` TEXT)
COMMENT 'Вернуть список портов группы'
BEGIN
SELECT
ports.*
FROM
ports,
device_groups
WHERE
device_groups.id = ports.device_group_id AND
device_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for function device_server.ports_get_id
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `ports_get_id`(`port_name` TEXT) RETURNS int(11)
COMMENT 'Вернуть идентификатор порта'
BEGIN
DECLARE rec_id INT DEFAULT 0;
SELECT id INTO rec_id FROM ports WHERE ports.name = port_name LIMIT 1;
RETURN rec_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_rename
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_rename`(IN `old_name` TEXT, IN `new_name` TEXT)
COMMENT 'Переименовать порт'
BEGIN
DECLARE exists_in_group TEXT DEFAULT '';
DECLARE exists_in_server TEXT DEFAULT '';

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при переименовании порта с `', old_name, '` на ', new_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# запрещаем пустое новое имя порта
IF(is_string_empty(new_name)) THEN
CALL return_fail(CONCAT('Не указано новое имя порта'));
LEAVE proc_body;
END IF;

# запрещаем дубликаты
IF(ports_get_id(new_name) != 0) THEN
SELECT
device_groups.name,
device_groups.server_name
INTO
exists_in_group,
exists_in_server
FROM
device_groups,
ports
WHERE
device_groups.id = ports.device_group_id AND
ports.name = new_name;

CALL return_fail(CONCAT('Порт `', new_name, '` уже существует в группе устройств `', exists_in_group, '` сервера `', exists_in_server, '`!'));
LEAVE proc_body;
END IF;

# запрещаем пустое исходное имя устройства
IF(is_string_empty(old_name)) THEN
CALL return_fail(CONCAT('Не указано исходное имя порта'));
LEAVE proc_body;
END IF;

UPDATE ports SET name = new_name WHERE name = old_name;

CALL return_ok(CONCAT('Порт успешно переименован с `', old_name, '` на `', new_name, '`!'));
END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.ports_set_config
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `ports_set_config`(IN `port_name` TEXT, IN `config` TEXT)
COMMENT 'Изменить настройки порта'
BEGIN
UPDATE ports SET ports.config = config WHERE ports.name = port_name;
END//
DELIMITER ;


# Dumping structure for function device_server.query_build
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `query_build`(`query_str` TEXT, `filter` TEXT, `options` TEXT) RETURNS text CHARSET utf8
COMMENT 'Построить запрос'
BEGIN
DECLARE ret TEXT DEFAULT '';

IF(!is_string_empty(query_str)) THEN
SET ret = query_str;

IF(!is_string_empty(filter)) THEN
SET ret = CONCAT(ret, ' ', filter);
END IF;

IF(!is_string_empty(options)) THEN
SET ret = CONCAT(ret, ' ', options);
END IF;

SET ret = CONCAT(ret, ';');

END IF;

RETURN ret;
END//
DELIMITER ;


# Dumping structure for procedure device_server.query_exec
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `query_exec`(IN `query_str` TEXT)
COMMENT 'Выполнить указанную строку запроса'
BEGIN
SET @str := query_str;
PREPARE query FROM @str;
EXECUTE query;
DEALLOCATE PREPARE query;
END//
DELIMITER ;


# Dumping structure for procedure device_server.return_fail
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `return_fail`(IN `message` TEXT)
COMMENT 'Вернуть рекордсет со статусом ошибки и сообщением'
BEGIN
SELECT 'error' AS state, message;
END//
DELIMITER ;


# Dumping structure for procedure device_server.return_ok
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `return_ok`(IN `message` TEXT)
COMMENT 'Вернуть рекордсет со статусом успеха и сообщением'
BEGIN
SELECT 'ok' AS state, message;
END//
DELIMITER ;


# Dumping structure for table device_server.tcwconfig
CREATE TABLE IF NOT EXISTS `tcwconfig` (
`TCW_ID` int(10) unsigned NOT NULL,
`TCW_NAME` text NOT NULL,
KEY `FK_tcwconfig_devices` (`TCW_ID`),
CONSTRAINT `FK_tcwconfig_devices` FOREIGN KEY (`TCW_ID`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица весов (только для поддержки старого АРМа)';

# Dumping data for table device_server.tcwconfig: ~2 rows (approximately)
/*!40000 ALTER TABLE `tcwconfig` DISABLE KEYS */;
INSERT INTO `tcwconfig` (`TCW_ID`, `TCW_NAME`) VALUES
(2, 'Кран 23 (24)'),
(3, 'Кран 23');
/*!40000 ALTER TABLE `tcwconfig` ENABLE KEYS */;


# Dumping structure for table device_server.tcwcurdata
CREATE TABLE IF NOT EXISTS `tcwcurdata` (
`TCW_ID` int(10) unsigned NOT NULL COMMENT 'Уникальный идентификатор весов',
`TMSTAMP` int(10) NOT NULL,
`TIME_T` int(15) default NULL COMMENT 'Время на весах',
`W1` int(10) default NULL COMMENT 'масса на главном подъеме',
`W2` int(10) default NULL COMMENT 'масса на вспомогательном подъеме',
`S1` int(10) default NULL COMMENT 'стабильность на главном подъеме',
`S2` int(10) default NULL COMMENT 'стабильность на вспомогательном подъеме',
KEY `FK_tcwcurdata_devices` (`TCW_ID`),
CONSTRAINT `FK_tcwcurdata_devices` FOREIGN KEY (`TCW_ID`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица текущих показаний весов (для поддержки старого АРМа)';

# Dumping data for table device_server.tcwcurdata: ~2 rows (approximately)
/*!40000 ALTER TABLE `tcwcurdata` DISABLE KEYS */;
INSERT INTO `tcwcurdata` (`TCW_ID`, `TMSTAMP`, `TIME_T`, `W1`, `W2`, `S1`, `S2`) VALUES
(2, 0, NULL, NULL, NULL, NULL, NULL),
(3, 0, 1294811810, 33300, -2147483646, 1, 1);
/*!40000 ALTER TABLE `tcwcurdata` ENABLE KEYS */;


# Dumping structure for table device_server.users
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор пользователя',
`name` varchar(255) NOT NULL COMMENT 'Логин',
`passw` text NOT NULL COMMENT 'Пароль',
`user_type` text NOT NULL COMMENT 'Тип учетки (system, user)',
`user_group_id` int(10) unsigned default NULL COMMENT 'Идентификатор группы, которой принадлежит пользователь',
`description` text COMMENT 'Описание пользователя',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`),
KEY `users_ibfk_1` (`user_group_id`),
CONSTRAINT `users_ibfk_1` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Таблица пользователей';

# Dumping data for table device_server.users: ~1 rows (approximately)
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` (`id`, `name`, `passw`, `user_type`, `user_group_id`, `description`) VALUES
(1, 'Администратор', '2CE6A5631CDDB8ECDA4083742E8EF044D24D7C1244FDA5BE', 'system', 1, 'Системная учетная запись');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;


# Dumping structure for procedure device_server.users_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_add`(IN `user_name` TEXT, IN `passw` TEXT, IN `group_name` TEXT)
COMMENT 'Добавить пользователя'
BEGIN
DECLARE exists_in_group TEXT DEFAULT '';
DECLARE group_id INT DEFAULT 0;

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении пользователя `', user_name, '` в группу `', group_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя пользователя
IF(is_string_empty(user_name)) THEN
CALL return_fail('Не указано имя пользователя');
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(users_get_id(user_name) != 0) THEN
SELECT
user_group.name
INTO
exists_in_group
FROM
user_groups,
users
WHERE
user_groups.id = users.user_group_id AND
users.name = user_name;

CALL return_fail(CONCAT('Пользователь `', user_name, '` уже существует в группе пользователей `', exists_in_group, '!'));
LEAVE proc_body;
END IF;

# не разрешаем пустой пароль
IF(is_string_empty(passw)) THEN
CALL return_fail('Не указан пароль пользователя');
LEAVE proc_body;
END IF;

# не разрешаем пустое имя группы
IF(is_string_empty(group_name)) THEN
CALL return_fail('Не указана группа пользователей!');
LEAVE proc_body;
END IF;

SELECT user_groups_get_id(group_name) INTO group_id;

IF(group_id = 0) THEN
CALL return_fail(CONCAT('Группа пользователей `', group_name, '` не существует!'));
LEAVE proc_body;
END IF;

INSERT INTO
users
(
name,
passw,
user_group_id,
user_type
)
VALUES
(
user_name,
passw,
group_id,
'user'
);

CALL return_ok(LAST_INSERT_ID());
END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_delete`(IN `user_name` TEXT)
COMMENT 'Удалить пользователя'
BEGIN
DELETE FROM users WHERE users.name = user_name AND users.user_type = 'user';
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_get`(IN `user_name` TEXT)
COMMENT 'Вернуть пользователей'
BEGIN
SELECT * FROM users WHERE users.name = user_name ORDER BY name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_get_admins
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_get_admins`()
COMMENT 'Вернуть администраторов'
BEGIN
SELECT
users.*
FROM
users,
user_groups
WHERE
users.user_group_id = user_groups.id AND
user_groups.name = 'Администраторы'
ORDER BY name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_get_all
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_get_all`()
COMMENT 'Вернуть полный список пользователей'
BEGIN
SELECT * FROM users ORDER BY name;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_get_devices
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_get_devices`(IN `user_name` TEXT)
COMMENT 'Вернуть список устройств пользователя (доступных)'
BEGIN
SELECT
devices.*
FROM
users,
devices,
user_groups_devices
WHERE
users.name = user_name AND
users.user_group_id = user_groups_devices.user_group_id AND
devices.id = user_groups_devices.device_id
ORDER BY name;
END//
DELIMITER ;


# Dumping structure for function device_server.users_get_id
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `users_get_id`(`user_name` TEXT) RETURNS int(11)
COMMENT 'Вернуть идентификатор пользователя'
BEGIN
DECLARE rec_id INT DEFAULT 0;
SELECT id INTO rec_id FROM users WHERE users.name = user_name LIMIT 1;
RETURN rec_id;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_get_policies
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_get_policies`(IN `user_name` TEXT)
COMMENT 'Вернуть список прав пользователя (включенных)'
BEGIN
SELECT
policies.*
FROM
users, policies, user_groups_policies
WHERE
users.name = user_name AND
users.user_group_id = user_groups_policies.user_group_id AND
policies.id = user_groups_policies.policy_id;
END//
DELIMITER ;


# Dumping structure for function device_server.users_get_user_group_name
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `users_get_user_group_name`(`user_name` TEXT) RETURNS text CHARSET utf8
COMMENT 'Вернуть имя группы пользователя'
BEGIN
DECLARE group_name TEXT DEFAULT '';

SELECT
user_groups.name
INTO
group_name
FROM
users,
user_groups
WHERE
users.user_group_id = user_groups.id AND
users.name = user_name;

RETURN group_name;
END//
DELIMITER ;


# Dumping structure for function device_server.users_is_policy_enabled
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `users_is_policy_enabled`(`user_name` TEXT, `policy_name` TEXT) RETURNS int(11)
COMMENT 'Включена ли опция для пользователя'
BEGIN
DECLARE enabled INT DEFAULT 0;

SELECT
COUNT(*)
INTO
enabled
FROM
user_groups_policies,
users,
policies
WHERE
users.name = user_name AND
policies.name = policy_name AND
users.user_group_id = user_groups_policies.user_group_id AND
policies.id = user_groups_policies.policy_id;

RETURN enabled;
END//
DELIMITER ;


# Dumping structure for procedure device_server.users_update
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `users_update`(IN `value_list` TEXT, IN `filter` TEXT)
COMMENT 'Изменить данные о пользователях'
BEGIN
CALL common_update('users', value_list, filter);
END//
DELIMITER ;


# Dumping structure for table device_server.user_groups
CREATE TABLE IF NOT EXISTS `user_groups` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор записи',
`name` varchar(255) NOT NULL COMMENT 'Имя группы пользователей',
`group_type` text NOT NULL COMMENT 'Тип группы пользователей (system, user)',
`description` text COMMENT 'Описание группы пользователей',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Таблица групп пользователей';

# Dumping data for table device_server.user_groups: ~1 rows (approximately)
/*!40000 ALTER TABLE `user_groups` DISABLE KEYS */;
INSERT INTO `user_groups` (`id`, `name`, `group_type`, `description`) VALUES
(1, 'Администраторы', 'system', 'Группа пользователей с максимальным доступом');
/*!40000 ALTER TABLE `user_groups` ENABLE KEYS */;


# Dumping structure for procedure device_server.user_groups_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_groups_add`(IN `group_name` TEXT, IN `description` TEXT)
COMMENT 'Добавить группу пользователей'
BEGIN
DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail(CONCAT('Ошибка при добавлении группы пользователей `', group_name, '`'));
END;

START TRANSACTION;

proc_body: BEGIN

# не разрешаем пустое имя группы пользователей
IF(is_string_empty(group_name)) THEN
CALL return_fail(CONCAT('Не указано имя группы пользователей'));
LEAVE proc_body;
END IF;

# не разрешаем дубликаты
IF(user_groups_get_id(group_name) != 0) THEN
CALL return_fail(CONCAT('Группа пользователей `', group_name, '` уже существует!'));
LEAVE proc_body;
END IF;

INSERT INTO
user_groups
(
name,
group_type,
description
)
VALUES
(
group_name,
'user',
description
);

CALL return_ok(LAST_INSERT_ID());

END proc_body;

COMMIT;
END//
DELIMITER ;


# Dumping structure for procedure device_server.user_groups_delete
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_groups_delete`(IN `group_name` TEXT)
COMMENT 'Удалить группу пользователей'
BEGIN
DELETE FROM user_groups WHERE user_groups.name = group_name;
END//
DELIMITER ;


# Dumping structure for table device_server.user_groups_devices
CREATE TABLE IF NOT EXISTS `user_groups_devices` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор записи',
`user_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы пользователей',
`device_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор устройства',
PRIMARY KEY (`id`),
UNIQUE KEY `device_id` (`device_id`,`user_group_id`),
KEY `device_id_2` (`device_id`),
KEY `user_group_id` (`user_group_id`),
CONSTRAINT `user_groups_devices_ibfk_1` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `user_groups_devices_ibfk_2` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица принадлежности устройств группам пользователей';

# Dumping data for table device_server.user_groups_devices: ~0 rows (approximately)
/*!40000 ALTER TABLE `user_groups_devices` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_groups_devices` ENABLE KEYS */;


# Dumping structure for procedure device_server.user_groups_get
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_groups_get`()
COMMENT 'Вернуть группы пользователей'
BEGIN
SELECT * FROM user_groups ORDER BY name;
END//
DELIMITER ;


# Dumping structure for function device_server.user_groups_get_id
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `user_groups_get_id`(`group_name` TEXT) RETURNS int(11)
COMMENT 'Вернуть идентификатор группы пользователей'
BEGIN
DECLARE rec_id INT DEFAULT 0;
SELECT id INTO rec_id FROM user_groups WHERE user_groups.name = group_name LIMIT 1;
RETURN rec_id;
END//
DELIMITER ;


# Dumping structure for table device_server.user_groups_policies
CREATE TABLE IF NOT EXISTS `user_groups_policies` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор записи',
`user_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы пользователей',
`policy_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор опции',
PRIMARY KEY (`id`),
KEY `FK_user_groups_devices_copy_user_groups` (`user_group_id`),
KEY `FK_user_groups_devices_copy_policies` (`policy_id`),
CONSTRAINT `FK_user_groups_devices_copy_policies` FOREIGN KEY (`policy_id`) REFERENCES `policies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_user_groups_devices_copy_user_groups` FOREIGN KEY (`user_group_id`) REFERENCES `user_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Таблица прав пользователя';

# Dumping data for table device_server.user_groups_policies: ~0 rows (approximately)
/*!40000 ALTER TABLE `user_groups_policies` DISABLE KEYS */;
/*!40000 ALTER TABLE `user_groups_policies` ENABLE KEYS */;


# Dumping structure for procedure device_server.user_groups_update
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `user_groups_update`(IN `value_list` TEXT, IN `filter` TEXT)
COMMENT 'Изменить данные о группах пользователей'
BEGIN
CALL common_update('user_groups', value_list, filter);
END//
DELIMITER ;


# Dumping structure for table device_server.weight_archive
CREATE TABLE IF NOT EXISTS `weight_archive` (
`id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор записи',
`plc_rec_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор записи в ПЛК',
`device_name` text NOT NULL COMMENT 'Название весов',
`time_stamp` datetime NOT NULL COMMENT 'Время взвешивания',
`weight` int(11) NOT NULL COMMENT 'Масса',
`stable` text NOT NULL COMMENT 'Стабильность показаний весов (yes, no)',
`weight_type` text NOT NULL COMMENT 'Тип записи взвешивания (gross, tare, dose)',
`tare_number` text COMMENT 'Номер тары',
`tare_type` text COMMENT 'Тип тары (kovsh, sovok)',
`addit_info` text COMMENT 'Дополнительная информация',
`comment` text COMMENT 'Примечание',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=803 DEFAULT CHARSET=utf8 COMMENT='Таблица архива взвешиваний';

# Dumping data for table device_server.weight_archive: ~967 rows (approximately)
/*!40000 ALTER TABLE `weight_archive` DISABLE KEYS */;
INSERT INTO `weight_archive` (`id`, `plc_rec_id`, `device_name`, `time_stamp`, `weight`, `stable`, `weight_type`, `tare_number`, `tare_type`, `addit_info`, `comment`) VALUES
(1, 836, 'Кран 23', '2010-12-29 13:17:10', 952000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(2, 837, 'Кран 23', '2010-12-29 13:17:12', 953000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(3, 838, 'Кран 23', '2010-12-29 13:17:12', 954000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(4, 881, 'Кран 23', '2010-12-29 13:17:14', 997000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(5, 927, 'Кран 23', '2010-12-29 13:17:16', 1043000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(6, 1010, 'Кран 23', '2010-12-29 13:17:18', 1126000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(7, 1066, 'Кран 23', '2010-12-29 13:17:19', 1182000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(8, 1146, 'Кран 23', '2010-12-29 13:17:24', 1262000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(9, 1197, 'Кран 23', '2010-12-29 13:17:27', 1313000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(10, 1250, 'Кран 23', '2010-12-29 13:17:29', 1366000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(11, 1312, 'Кран 23', '2010-12-29 13:17:31', 1428000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(12, 1313, 'Кран 23', '2010-12-29 13:17:30', 1429000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(13, 1314, 'Кран 23', '2010-12-29 13:17:31', 1430000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(14, 1315, 'Кран 23', '2010-12-29 13:17:30', 1431000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(15, 1316, 'Кран 23', '2010-12-29 13:17:30', 1432000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(16, 1317, 'Кран 23', '2010-12-29 13:17:30', 1433000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(17, 1318, 'Кран 23', '2010-12-29 13:17:30', 1434000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(18, 1319, 'Кран 23', '2010-12-29 13:17:31', 1435000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(19, 1320, 'Кран 23', '2010-12-29 13:17:30', 1436000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(20, 1321, 'Кран 23', '2010-12-29 13:17:30', 1437000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(21, 1322, 'Кран 23', '2010-12-29 13:17:31', 1438000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(22, 1323, 'Кран 23', '2010-12-29 13:17:30', 1439000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(23, 1324, 'Кран 23', '2010-12-29 13:17:30', 1440000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(24, 1325, 'Кран 23', '2010-12-29 13:17:31', 1441000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(25, 1326, 'Кран 23', '2010-12-29 13:17:31', 1442000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(26, 1327, 'Кран 23', '2010-12-29 13:17:31', 1443000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(27, 1328, 'Кран 23', '2010-12-29 13:17:30', 1444000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(28, 1329, 'Кран 23', '2010-12-29 13:17:30', 1445000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(29, 1330, 'Кран 23', '2010-12-29 13:17:30', 1446000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(30, 1331, 'Кран 23', '2010-12-29 13:17:31', 1447000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(31, 1332, 'Кран 23', '2010-12-29 13:17:31', 1448000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(32, 1333, 'Кран 23', '2010-12-29 13:17:31', 1449000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(33, 1334, 'Кран 23', '2010-12-29 13:17:31', 1450000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(34, 1335, 'Кран 23', '2010-12-29 13:17:32', 1451000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(35, 1336, 'Кран 23', '2010-12-29 13:17:32', 1452000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(36, 1337, 'Кран 23', '2010-12-29 13:17:32', 1453000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(37, 1338, 'Кран 23', '2010-12-29 13:17:32', 1454000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(38, 1339, 'Кран 23', '2010-12-29 13:17:32', 1455000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(39, 1340, 'Кран 23', '2010-12-29 13:17:32', 1456000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(40, 1341, 'Кран 23', '2010-12-29 13:17:32', 1457000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(41, 1342, 'Кран 23', '2010-12-29 13:17:32', 1458000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(42, 1343, 'Кран 23', '2010-12-29 13:17:32', 1459000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(43, 1344, 'Кран 23', '2010-12-29 13:17:31', 1460000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(44, 1345, 'Кран 23', '2010-12-29 13:17:31', 1461000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(45, 1346, 'Кран 23', '2010-12-29 13:17:31', 1462000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(46, 1347, 'Кран 23', '2010-12-29 13:17:31', 1463000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(47, 1348, 'Кран 23', '2010-12-29 13:17:31', 1464000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(48, 1349, 'Кран 23', '2010-12-29 13:17:31', 1465000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(49, 1350, 'Кран 23', '2010-12-29 13:17:31', 1466000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(50, 1351, 'Кран 23', '2010-12-29 13:17:31', 1467000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(51, 1352, 'Кран 23', '2010-12-29 13:17:31', 1468000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(52, 1353, 'Кран 23', '2010-12-29 13:17:32', 1469000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(53, 1354, 'Кран 23', '2010-12-29 13:17:31', 1470000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(54, 1355, 'Кран 23', '2010-12-29 13:17:31', 1471000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(55, 1356, 'Кран 23', '2010-12-29 13:17:31', 1472000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(56, 1357, 'Кран 23', '2010-12-29 13:17:32', 1473000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(57, 1358, 'Кран 23', '2010-12-29 13:17:32', 1474000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(58, 1359, 'Кран 23', '2010-12-29 13:17:32', 1475000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(59, 1360, 'Кран 23', '2010-12-29 13:17:33', 1476000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(60, 1361, 'Кран 23', '2010-12-29 13:17:33', 1477000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(61, 1362, 'Кран 23', '2010-12-29 13:17:33', 1478000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(62, 1363, 'Кран 23', '2010-12-29 13:17:33', 1479000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(63, 1364, 'Кран 23', '2010-12-29 13:17:33', 1480000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(64, 1365, 'Кран 23', '2010-12-29 13:17:33', 1481000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(65, 1366, 'Кран 23', '2010-12-29 13:17:33', 1482000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(66, 1367, 'Кран 23', '2010-12-29 13:17:32', 1483000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(67, 1368, 'Кран 23', '2010-12-29 13:17:33', 1484000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(68, 1369, 'Кран 23', '2010-12-29 13:17:33', 1485000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(69, 1370, 'Кран 23', '2010-12-29 13:17:33', 1486000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(70, 1371, 'Кран 23', '2010-12-29 13:17:32', 1487000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(71, 1372, 'Кран 23', '2010-12-29 13:17:33', 1488000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(72, 1373, 'Кран 23', '2010-12-29 13:17:33', 1489000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(73, 1374, 'Кран 23', '2010-12-29 13:17:33', 1490000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(74, 1375, 'Кран 23', '2010-12-29 13:17:33', 1491000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(75, 1376, 'Кран 23', '2010-12-29 13:17:34', 1492000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(76, 1377, 'Кран 23', '2010-12-29 13:17:34', 1493000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(77, 1378, 'Кран 23', '2010-12-29 13:17:34', 1494000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(78, 1379, 'Кран 23', '2010-12-29 13:17:33', 1495000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(79, 1380, 'Кран 23', '2010-12-29 13:17:33', 1496000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(80, 1381, 'Кран 23', '2010-12-29 13:17:33', 1497000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(81, 1382, 'Кран 23', '2010-12-29 13:17:33', 1498000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(82, 1383, 'Кран 23', '2010-12-29 13:17:32', 1499000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(83, 1384, 'Кран 23', '2010-12-29 13:17:33', 1500000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(84, 1385, 'Кран 23', '2010-12-29 13:17:32', 1501000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(85, 1386, 'Кран 23', '2010-12-29 13:17:34', 1502000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(86, 1387, 'Кран 23', '2010-12-29 13:17:33', 1503000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(87, 1388, 'Кран 23', '2010-12-29 13:17:33', 1504000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(88, 1389, 'Кран 23', '2010-12-29 13:17:34', 1505000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(89, 1390, 'Кран 23', '2010-12-29 13:17:34', 1506000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(90, 1391, 'Кран 23', '2010-12-29 13:17:34', 1507000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(91, 1392, 'Кран 23', '2010-12-29 13:17:34', 1508000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(92, 1393, 'Кран 23', '2010-12-29 13:17:35', 1509000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(93, 1394, 'Кран 23', '2010-12-29 13:17:34', 1510000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(94, 1395, 'Кран 23', '2010-12-29 13:17:34', 1511000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(95, 1396, 'Кран 23', '2010-12-29 13:17:34', 1512000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(96, 1397, 'Кран 23', '2010-12-29 13:17:33', 1513000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(97, 1398, 'Кран 23', '2010-12-29 13:17:33', 1514000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(98, 1399, 'Кран 23', '2010-12-29 13:17:34', 1515000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(99, 1400, 'Кран 23', '2010-12-29 13:17:33', 1516000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(100, 1401, 'Кран 23', '2010-12-29 13:17:33', 1517000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(101, 1402, 'Кран 23', '2010-12-29 13:17:34', 1518000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(102, 1403, 'Кран 23', '2010-12-29 13:17:34', 1519000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(103, 1404, 'Кран 23', '2010-12-29 13:17:34', 1520000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(104, 1405, 'Кран 23', '2010-12-29 13:17:34', 1521000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(105, 1406, 'Кран 23', '2010-12-29 13:17:34', 1522000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(106, 1407, 'Кран 23', '2010-12-29 13:17:34', 1523000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(107, 1408, 'Кран 23', '2010-12-29 13:17:34', 1524000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(108, 1409, 'Кран 23', '2010-12-29 13:17:34', 1525000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(109, 1410, 'Кран 23', '2010-12-29 13:17:34', 1526000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(110, 1411, 'Кран 23', '2010-12-29 13:17:34', 1527000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(111, 1412, 'Кран 23', '2010-12-29 14:07:40', 1528000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(112, 1413, 'Кран 23', '2010-12-29 14:07:41', 1529000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(113, 1414, 'Кран 23', '2010-12-29 14:07:41', 1530000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(114, 1415, 'Кран 23', '2010-12-29 14:07:41', 1531000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(115, 1416, 'Кран 23', '2010-12-29 14:07:42', 1532000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(116, 1417, 'Кран 23', '2010-12-29 14:07:42', 1533000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(117, 1417, 'Кран 23', '2010-12-29 14:07:41', 1533000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(118, 1418, 'Кран 23', '2010-12-29 14:07:42', 1534000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(119, 1419, 'Кран 23', '2010-12-29 14:07:42', 1535000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(120, 1420, 'Кран 23', '2010-12-29 14:07:42', 1536000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(121, 1421, 'Кран 23', '2010-12-29 14:07:42', 1537000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(122, 1422, 'Кран 23', '2010-12-29 14:07:41', 1538000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(123, 1423, 'Кран 23', '2010-12-29 14:07:41', 1539000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(124, 1424, 'Кран 23', '2010-12-29 14:07:41', 1540000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(125, 1425, 'Кран 23', '2010-12-29 14:07:41', 1541000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(126, 1426, 'Кран 23', '2010-12-29 14:07:41', 1542000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(127, 1427, 'Кран 23', '2010-12-29 14:07:41', 1543000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(128, 1428, 'Кран 23', '2010-12-29 14:07:41', 1544000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(129, 1429, 'Кран 23', '2010-12-29 14:07:41', 1545000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(130, 1430, 'Кран 23', '2010-12-29 14:07:41', 1546000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(131, 1431, 'Кран 23', '2010-12-29 14:07:42', 1547000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(132, 1431, 'Кран 23', '2010-12-29 14:07:41', 1547000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(133, 1432, 'Кран 23', '2010-12-29 14:07:42', 1548000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(134, 1433, 'Кран 23', '2010-12-29 14:07:42', 1549000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(135, 1434, 'Кран 23', '2010-12-29 14:07:42', 1550000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(136, 1435, 'Кран 23', '2010-12-29 14:07:42', 1551000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(137, 1436, 'Кран 23', '2010-12-29 14:07:42', 1552000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(138, 1437, 'Кран 23', '2010-12-29 14:07:42', 1553000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(139, 1438, 'Кран 23', '2010-12-29 14:07:42', 1554000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(140, 1439, 'Кран 23', '2010-12-29 14:07:42', 1555000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(141, 1440, 'Кран 23', '2010-12-29 14:07:42', 1556000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(142, 1441, 'Кран 23', '2010-12-29 14:07:42', 1557000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(143, 1442, 'Кран 23', '2010-12-29 14:07:42', 1558000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(144, 1443, 'Кран 23', '2010-12-29 14:07:43', 1559000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(145, 1444, 'Кран 23', '2010-12-29 14:07:43', 1560000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(146, 1445, 'Кран 23', '2010-12-29 14:07:42', 1561000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(147, 1446, 'Кран 23', '2010-12-29 14:07:42', 1562000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(148, 1447, 'Кран 23', '2010-12-29 14:07:42', 1563000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(149, 1448, 'Кран 23', '2010-12-29 14:07:42', 1564000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(150, 1449, 'Кран 23', '2010-12-29 14:07:42', 1565000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(151, 1450, 'Кран 23', '2010-12-29 14:07:42', 1566000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(152, 1451, 'Кран 23', '2010-12-29 14:07:42', 1567000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(153, 1452, 'Кран 23', '2010-12-29 14:07:42', 1568000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(154, 1453, 'Кран 23', '2010-12-29 14:07:42', 1569000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(155, 1454, 'Кран 23', '2010-12-29 14:07:42', 1570000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(156, 1455, 'Кран 23', '2010-12-29 14:07:42', 1571000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(157, 1456, 'Кран 23', '2010-12-29 14:07:42', 1572000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(158, 1457, 'Кран 23', '2010-12-29 14:07:42', 1573000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(159, 1458, 'Кран 23', '2010-12-29 14:07:42', 1574000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(160, 1459, 'Кран 23', '2010-12-29 14:07:42', 1575000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(161, 1460, 'Кран 23', '2010-12-29 14:07:42', 1576000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(162, 1461, 'Кран 23', '2010-12-29 14:07:42', 1577000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(163, 1462, 'Кран 23', '2010-12-29 14:07:43', 1578000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(164, 1462, 'Кран 23', '2010-12-29 14:07:42', 1578000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(165, 1463, 'Кран 23', '2010-12-29 14:07:42', 1579000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(166, 1464, 'Кран 23', '2010-12-29 14:07:42', 1580000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(167, 1465, 'Кран 23', '2010-12-29 14:07:42', 1581000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(168, 1466, 'Кран 23', '2010-12-29 14:07:42', 1582000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(169, 1467, 'Кран 23', '2010-12-29 14:07:43', 1583000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(170, 1468, 'Кран 23', '2010-12-29 14:07:44', 1584000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(171, 1469, 'Кран 23', '2010-12-29 14:07:44', 1585000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(172, 1469, 'Кран 23', '2010-12-29 14:07:43', 1585000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(173, 1470, 'Кран 23', '2010-12-29 14:07:43', 1586000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(174, 1471, 'Кран 23', '2010-12-29 14:07:44', 1587000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(175, 1472, 'Кран 23', '2010-12-29 14:07:44', 1588000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(176, 1473, 'Кран 23', '2010-12-29 14:07:44', 1589000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(177, 1474, 'Кран 23', '2010-12-29 14:07:44', 1590000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(178, 1475, 'Кран 23', '2010-12-29 14:07:44', 1591000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(179, 1476, 'Кран 23', '2010-12-29 14:07:43', 1592000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(180, 1477, 'Кран 23', '2010-12-29 14:07:44', 1593000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(181, 1478, 'Кран 23', '2010-12-29 14:07:44', 1594000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(182, 1479, 'Кран 23', '2010-12-29 14:07:44', 1595000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(183, 1480, 'Кран 23', '2010-12-29 14:07:44', 1596000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(184, 1481, 'Кран 23', '2010-12-29 14:07:44', 1597000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(185, 1482, 'Кран 23', '2010-12-29 14:07:44', 1598000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(186, 1483, 'Кран 23', '2010-12-29 14:07:44', 1599000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(187, 1484, 'Кран 23', '2010-12-29 14:07:43', 1600000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(188, 1485, 'Кран 23', '2010-12-29 14:07:43', 1601000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(189, 1486, 'Кран 23', '2010-12-29 14:07:43', 1602000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(190, 1487, 'Кран 23', '2010-12-29 14:07:43', 1603000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(191, 1488, 'Кран 23', '2010-12-29 14:07:43', 1604000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(192, 1489, 'Кран 23', '2010-12-29 14:07:44', 1605000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(193, 1490, 'Кран 23', '2010-12-29 14:07:44', 1606000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(194, 1491, 'Кран 23', '2010-12-29 14:07:43', 1607000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(195, 1492, 'Кран 23', '2010-12-29 14:07:43', 1608000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(196, 1493, 'Кран 23', '2010-12-29 14:07:43', 1609000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(197, 1494, 'Кран 23', '2010-12-29 14:07:44', 1610000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(198, 1495, 'Кран 23', '2010-12-29 14:07:44', 1611000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(199, 1496, 'Кран 23', '2010-12-29 14:07:44', 1612000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(200, 1496, 'Кран 23', '2010-12-29 14:07:43', 1612000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(201, 1497, 'Кран 23', '2010-12-29 14:07:43', 1613000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(202, 1498, 'Кран 23', '2010-12-29 14:07:43', 1614000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(203, 1499, 'Кран 23', '2010-12-29 14:07:43', 1615000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(204, 1500, 'Кран 23', '2010-12-29 14:07:45', 1616000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(205, 1501, 'Кран 23', '2010-12-29 14:07:45', 1617000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(206, 1502, 'Кран 23', '2010-12-29 14:07:45', 1618000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(207, 1503, 'Кран 23', '2010-12-29 14:07:45', 1619000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(208, 1504, 'Кран 23', '2010-12-29 14:07:45', 1620000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(209, 1505, 'Кран 23', '2010-12-29 14:07:45', 1621000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(210, 1506, 'Кран 23', '2010-12-29 14:07:45', 1622000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(211, 1507, 'Кран 23', '2010-12-29 14:07:45', 1623000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(212, 1508, 'Кран 23', '2010-12-29 16:40:50', 1624000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(213, 1509, 'Кран 23', '2010-12-29 16:40:50', 1625000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(214, 1542, 'Кран 23', '2010-12-29 16:40:52', 1658000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(215, 1609, 'Кран 23', '2010-12-29 16:40:55', 1725000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(216, 1673, 'Кран 23', '2010-12-29 16:40:57', 1789000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(217, 1727, 'Кран 23', '2010-12-29 16:40:59', 1843000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(218, 1791, 'Кран 23', '2010-12-29 16:41:01', 1907000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(219, 1859, 'Кран 23', '2010-12-29 16:41:03', 1975000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(220, 1910, 'Кран 23', '2010-12-29 16:41:06', 2026000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(221, 1965, 'Кран 23', '2010-12-29 16:41:07', 2081000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(222, 2019, 'Кран 23', '2010-12-29 16:41:09', 2135000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(223, 2030, 'Кран 23', '2010-12-29 16:41:10', 2146000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(224, 2031, 'Кран 23', '2010-12-29 16:41:10', 2147000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(225, 2032, 'Кран 23', '2010-12-29 16:41:10', 2148000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(226, 2033, 'Кран 23', '2010-12-29 16:41:10', 2149000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(227, 2034, 'Кран 23', '2010-12-29 16:41:10', 2150000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(228, 2035, 'Кран 23', '2010-12-29 16:41:10', 2151000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(229, 2036, 'Кран 23', '2010-12-29 16:41:10', 2152000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(230, 2037, 'Кран 23', '2010-12-29 16:41:10', 2153000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(231, 2038, 'Кран 23', '2010-12-29 16:41:11', 2154000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(232, 2039, 'Кран 23', '2010-12-29 16:41:10', 2155000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(233, 2040, 'Кран 23', '2010-12-29 16:41:10', 2156000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(234, 2041, 'Кран 23', '2010-12-29 16:41:10', 2157000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(235, 2042, 'Кран 23', '2010-12-29 16:41:10', 2158000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(236, 2043, 'Кран 23', '2010-12-29 16:41:10', 2159000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(237, 2044, 'Кран 23', '2010-12-29 16:41:09', 2160000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(238, 2045, 'Кран 23', '2010-12-29 16:41:10', 2161000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(239, 2046, 'Кран 23', '2010-12-29 16:41:10', 2162000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(240, 2047, 'Кран 23', '2010-12-29 16:41:10', 2163000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(241, 2048, 'Кран 23', '2010-12-29 16:41:11', 2164000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(242, 2049, 'Кран 23', '2010-12-29 16:41:10', 2165000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(243, 2050, 'Кран 23', '2010-12-29 16:41:11', 2166000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(244, 2051, 'Кран 23', '2010-12-29 16:41:11', 2167000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(245, 2052, 'Кран 23', '2010-12-29 16:41:11', 2168000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(246, 2053, 'Кран 23', '2010-12-29 16:41:11', 2169000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(247, 2054, 'Кран 23', '2010-12-29 16:41:11', 2170000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(248, 2055, 'Кран 23', '2010-12-29 16:41:11', 2171000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(249, 2056, 'Кран 23', '2010-12-29 16:41:10', 2172000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(250, 2057, 'Кран 23', '2010-12-29 16:41:10', 2173000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(251, 2058, 'Кран 23', '2010-12-29 16:41:11', 2174000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(252, 2059, 'Кран 23', '2010-12-29 16:41:11', 2175000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(253, 2060, 'Кран 23', '2010-12-29 16:41:11', 2176000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(254, 2061, 'Кран 23', '2010-12-29 16:41:11', 2177000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(255, 2062, 'Кран 23', '2010-12-29 16:41:11', 2178000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(256, 2063, 'Кран 23', '2010-12-29 16:41:11', 2179000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(257, 2064, 'Кран 23', '2010-12-29 16:41:11', 2180000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(258, 2065, 'Кран 23', '2010-12-29 16:41:11', 2181000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(259, 2066, 'Кран 23', '2010-12-29 16:41:12', 2182000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(260, 2067, 'Кран 23', '2010-12-29 16:41:11', 2183000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(261, 2068, 'Кран 23', '2010-12-29 16:41:11', 2184000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(262, 2069, 'Кран 23', '2010-12-29 16:41:11', 2185000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(263, 2070, 'Кран 23', '2010-12-29 16:41:11', 2186000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(264, 2071, 'Кран 23', '2010-12-29 16:41:11', 2187000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(265, 2072, 'Кран 23', '2010-12-29 16:41:11', 2188000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(266, 2073, 'Кран 23', '2010-12-29 16:41:11', 2189000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(267, 2074, 'Кран 23', '2010-12-29 16:41:11', 2190000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(268, 2075, 'Кран 23', '2010-12-29 16:41:11', 2191000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(269, 2076, 'Кран 23', '2010-12-29 16:41:11', 2192000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(270, 2077, 'Кран 23', '2010-12-29 16:41:12', 2193000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(271, 2078, 'Кран 23', '2010-12-29 16:41:12', 2194000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(272, 2079, 'Кран 23', '2010-12-29 16:41:13', 2195000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(273, 2080, 'Кран 23', '2010-12-29 16:41:14', 2196000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(274, 2081, 'Кран 23', '2010-12-29 16:41:12', 2197000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(275, 2082, 'Кран 23', '2010-12-29 16:41:12', 2198000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(276, 2083, 'Кран 23', '2010-12-29 16:41:12', 2199000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(277, 2084, 'Кран 23', '2010-12-29 16:41:12', 2200000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(278, 2085, 'Кран 23', '2010-12-29 16:41:13', 2201000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(279, 2086, 'Кран 23', '2010-12-29 16:41:12', 2202000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(280, 2087, 'Кран 23', '2010-12-29 16:41:12', 2203000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(281, 2088, 'Кран 23', '2010-12-29 16:41:12', 2204000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(282, 2089, 'Кран 23', '2010-12-29 16:41:12', 2205000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(283, 2090, 'Кран 23', '2010-12-29 16:41:12', 2206000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(284, 2091, 'Кран 23', '2010-12-29 16:41:12', 2207000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(285, 2092, 'Кран 23', '2010-12-29 16:41:12', 2208000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(286, 2093, 'Кран 23', '2010-12-29 16:41:12', 2209000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(287, 2094, 'Кран 23', '2010-12-29 16:41:13', 2210000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(288, 2095, 'Кран 23', '2010-12-29 16:41:12', 2211000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(289, 2096, 'Кран 23', '2010-12-29 16:41:12', 2212000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(290, 2097, 'Кран 23', '2010-12-29 16:41:12', 2213000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(291, 2098, 'Кран 23', '2010-12-29 16:41:12', 2214000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(292, 2099, 'Кран 23', '2010-12-29 16:41:12', 2215000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(293, 2100, 'Кран 23', '2010-12-29 16:41:12', 2216000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(294, 2101, 'Кран 23', '2010-12-29 16:41:12', 2217000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(295, 2102, 'Кран 23', '2010-12-29 16:41:12', 2218000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(296, 2103, 'Кран 23', '2010-12-29 16:41:12', 2219000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(297, 2104, 'Кран 23', '2010-12-29 16:41:12', 2220000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(298, 2105, 'Кран 23', '2010-12-29 16:41:13', 2221000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(299, 2106, 'Кран 23', '2010-12-29 16:41:13', 2222000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(300, 2107, 'Кран 23', '2010-12-29 16:41:13', 2223000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(301, 2108, 'Кран 23', '2010-12-29 16:41:13', 2224000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(302, 2109, 'Кран 23', '2010-12-29 16:41:13', 2225000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(303, 2110, 'Кран 23', '2010-12-29 16:41:13', 2226000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(304, 2111, 'Кран 23', '2010-12-29 16:41:13', 2227000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(305, 2112, 'Кран 23', '2010-12-29 16:41:13', 2228000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(306, 2113, 'Кран 23', '2010-12-29 16:41:14', 2229000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(307, 2114, 'Кран 23', '2010-12-29 16:41:14', 2230000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(308, 2115, 'Кран 23', '2010-12-29 16:41:13', 2231000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(309, 2116, 'Кран 23', '2010-12-29 16:41:13', 2232000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(310, 2117, 'Кран 23', '2010-12-29 16:41:13', 2233000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(311, 2118, 'Кран 23', '2010-12-29 16:41:13', 2234000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(312, 2119, 'Кран 23', '2010-12-29 16:41:14', 2235000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(313, 2120, 'Кран 23', '2010-12-29 16:41:13', 2236000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(314, 2121, 'Кран 23', '2010-12-29 16:41:13', 2237000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(315, 2122, 'Кран 23', '2010-12-29 16:41:13', 2238000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(316, 2123, 'Кран 23', '2010-12-29 16:41:13', 2239000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(317, 2124, 'Кран 23', '2010-12-29 16:41:13', 2240000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(318, 2125, 'Кран 23', '2010-12-29 16:41:13', 2241000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(319, 2126, 'Кран 23', '2010-12-29 16:41:14', 2242000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(320, 2127, 'Кран 23', '2010-12-29 16:41:13', 2243000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(321, 2128, 'Кран 23', '2010-12-29 16:41:13', 2244000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(322, 2129, 'Кран 23', '2010-12-29 16:41:13', 2245000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(323, 2130, 'Кран 23', '2010-12-29 16:48:18', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(324, 2131, 'Кран 23', '2010-12-29 16:48:18', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(325, 2132, 'Кран 23', '2010-12-29 16:48:19', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(326, 2133, 'Кран 23', '2010-12-29 16:48:19', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(327, 2134, 'Кран 23', '2010-12-29 16:48:21', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(328, 2135, 'Кран 23', '2010-12-29 16:48:21', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(329, 2136, 'Кран 23', '2010-12-29 16:48:21', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(330, 2137, 'Кран 23', '2010-12-29 16:48:22', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(331, 2138, 'Кран 23', '2010-12-29 16:48:22', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(332, 2139, 'Кран 23', '2010-12-29 16:48:23', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(333, 2140, 'Кран 23', '2010-12-29 16:48:24', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(334, 2141, 'Кран 23', '2010-12-29 16:48:26', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(335, 2142, 'Кран 23', '2010-12-29 16:48:26', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(336, 2143, 'Кран 23', '2010-12-29 16:48:27', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(337, 2144, 'Кран 23', '2010-12-29 16:48:26', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(338, 2145, 'Кран 23', '2010-12-29 16:48:28', 45050, 'yes', 'gross', '55', 'sovok', '', NULL),
(339, 2633, 'Кран 23', '2010-12-30 10:52:19', 2733000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(340, 2634, 'Кран 23', '2010-12-30 10:52:19', 2734000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(341, 2635, 'Кран 23', '2010-12-30 10:52:19', 2735000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(342, 2636, 'Кран 23', '2010-12-30 10:52:19', 2736000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(343, 2637, 'Кран 23', '2010-12-30 10:52:20', 2737000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(344, 2638, 'Кран 23', '2010-12-30 10:52:19', 2738000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(345, 2639, 'Кран 23', '2010-12-30 10:52:20', 2739000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(346, 2640, 'Кран 23', '2010-12-30 10:52:19', 2740000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(347, 2641, 'Кран 23', '2010-12-30 10:52:19', 2741000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(348, 2642, 'Кран 23', '2010-12-30 10:52:20', 2742000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(349, 2643, 'Кран 23', '2010-12-30 10:52:19', 2743000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(350, 2644, 'Кран 23', '2010-12-30 10:52:19', 2744000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(351, 2645, 'Кран 23', '2010-12-30 10:52:20', 2745000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(352, 2646, 'Кран 23', '2010-12-30 10:52:19', 2746000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(353, 2647, 'Кран 23', '2010-12-30 10:52:20', 2747000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(354, 2648, 'Кран 23', '2010-12-30 10:52:20', 2748000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(355, 2649, 'Кран 23', '2010-12-30 10:52:20', 2749000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(356, 2650, 'Кран 23', '2010-12-30 10:52:19', 2750000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(357, 2651, 'Кран 23', '2010-12-30 10:52:19', 2751000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(358, 2652, 'Кран 23', '2010-12-30 10:52:19', 2752000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(359, 2653, 'Кран 23', '2010-12-30 10:52:19', 2753000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(360, 2654, 'Кран 23', '2010-12-30 10:52:19', 2754000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(361, 2655, 'Кран 23', '2010-12-30 10:52:20', 2755000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(362, 2656, 'Кран 23', '2010-12-30 10:52:19', 2756000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(363, 2657, 'Кран 23', '2010-12-30 10:52:19', 2757000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(364, 2658, 'Кран 23', '2010-12-30 10:52:19', 2758000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(365, 2659, 'Кран 23', '2010-12-30 10:52:19', 2759000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(366, 2660, 'Кран 23', '2010-12-30 10:52:20', 2760000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(367, 2661, 'Кран 23', '2010-12-30 10:52:20', 2761000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(368, 2662, 'Кран 23', '2010-12-30 10:52:20', 2762000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(369, 2663, 'Кран 23', '2010-12-30 10:52:21', 2763000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(370, 2664, 'Кран 23', '2010-12-30 10:52:20', 2764000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(371, 2665, 'Кран 23', '2010-12-30 10:52:20', 2765000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(372, 2666, 'Кран 23', '2010-12-30 10:52:20', 2766000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(373, 2667, 'Кран 23', '2010-12-30 10:52:20', 2767000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(374, 2668, 'Кран 23', '2010-12-30 10:52:20', 2768000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(375, 2669, 'Кран 23', '2010-12-30 10:52:20', 2769000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(376, 2670, 'Кран 23', '2010-12-30 10:52:21', 2770000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(377, 2671, 'Кран 23', '2010-12-30 10:52:20', 2771000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(378, 2672, 'Кран 23', '2010-12-30 10:52:21', 2772000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(379, 2673, 'Кран 23', '2010-12-30 10:52:20', 2773000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(380, 2674, 'Кран 23', '2010-12-30 10:52:20', 2774000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(381, 2675, 'Кран 23', '2010-12-30 10:52:20', 2775000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(382, 2676, 'Кран 23', '2010-12-30 10:52:22', 2776000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(383, 2677, 'Кран 23', '2010-12-30 10:52:23', 2777000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(384, 2678, 'Кран 23', '2010-12-30 10:52:21', 2778000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(385, 2679, 'Кран 23', '2010-12-30 10:52:21', 2779000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(386, 2680, 'Кран 23', '2010-12-30 10:52:21', 2780000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(387, 2681, 'Кран 23', '2010-12-30 10:52:21', 2781000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(388, 2682, 'Кран 23', '2010-12-30 10:52:21', 2782000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(389, 2683, 'Кран 23', '2010-12-30 10:52:21', 2783000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(390, 2684, 'Кран 23', '2010-12-30 10:52:21', 2784000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(391, 2685, 'Кран 23', '2010-12-30 10:52:21', 2785000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(392, 2686, 'Кран 23', '2010-12-30 10:52:21', 2786000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(393, 2687, 'Кран 23', '2010-12-30 10:52:24', 2787000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(394, 2688, 'Кран 23', '2010-12-30 10:52:21', 2788000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(395, 2689, 'Кран 23', '2010-12-30 10:52:22', 2789000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(396, 2690, 'Кран 23', '2010-12-30 10:52:22', 2790000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(397, 2691, 'Кран 23', '2010-12-30 10:52:22', 2791000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(398, 2692, 'Кран 23', '2010-12-30 10:52:23', 2792000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(399, 2693, 'Кран 23', '2010-12-30 10:52:23', 2793000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(400, 2694, 'Кран 23', '2010-12-30 10:52:23', 2794000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(401, 2695, 'Кран 23', '2010-12-30 10:52:23', 2795000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(402, 2696, 'Кран 23', '2010-12-30 10:52:22', 2796000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(403, 2697, 'Кран 23', '2010-12-30 10:52:22', 2797000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(404, 2698, 'Кран 23', '2010-12-30 10:52:23', 2798000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(405, 2699, 'Кран 23', '2010-12-30 10:52:23', 2799000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(406, 2700, 'Кран 23', '2010-12-30 10:52:25', 2800000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(407, 2701, 'Кран 23', '2010-12-30 10:52:23', 2801000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(408, 2702, 'Кран 23', '2010-12-30 10:52:22', 2802000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(409, 2703, 'Кран 23', '2010-12-30 10:52:22', 2803000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(410, 2704, 'Кран 23', '2010-12-30 10:52:23', 2804000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(411, 2705, 'Кран 23', '2010-12-30 10:52:23', 2805000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(412, 2706, 'Кран 23', '2010-12-30 10:52:24', 2806000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(413, 2707, 'Кран 23', '2010-12-30 10:52:22', 2807000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(414, 2708, 'Кран 23', '2010-12-30 10:52:22', 2808000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(415, 2709, 'Кран 23', '2010-12-30 10:52:22', 2809000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(416, 2710, 'Кран 23', '2010-12-30 10:52:22', 2810000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(417, 2711, 'Кран 23', '2010-12-30 10:52:23', 2811000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(418, 2712, 'Кран 23', '2010-12-30 10:52:22', 2812000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(419, 2713, 'Кран 23', '2010-12-30 10:52:23', 2813000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(420, 2714, 'Кран 23', '2010-12-30 10:52:23', 2814000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(421, 2715, 'Кран 23', '2010-12-30 10:52:23', 2815000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(422, 2716, 'Кран 23', '2010-12-30 10:52:23', 2816000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(423, 2717, 'Кран 23', '2010-12-30 10:52:24', 2817000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(424, 2718, 'Кран 23', '2010-12-30 10:52:23', 2818000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(425, 2719, 'Кран 23', '2010-12-30 10:52:23', 2819000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(426, 2720, 'Кран 23', '2010-12-30 10:52:23', 2820000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(427, 2721, 'Кран 23', '2010-12-30 10:52:23', 2821000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(428, 2722, 'Кран 23', '2010-12-30 10:52:23', 2822000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(429, 2723, 'Кран 23', '2010-12-30 10:52:24', 2823000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(430, 2724, 'Кран 23', '2010-12-30 10:52:23', 2824000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(431, 2725, 'Кран 23', '2010-12-30 10:52:23', 2825000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(432, 2726, 'Кран 23', '2010-12-30 10:52:24', 2826000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(433, 2727, 'Кран 23', '2010-12-30 10:52:24', 2827000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(434, 2728, 'Кран 23', '2010-12-30 10:52:24', 2828000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(435, 2729, 'Кран 23', '2010-12-30 10:52:23', 2829000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(436, 2730, 'Кран 23', '2010-12-30 10:52:24', 2830000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(437, 2731, 'Кран 23', '2010-12-30 10:52:23', 2831000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(438, 2732, 'Кран 23', '2010-12-30 10:52:24', 2832000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(439, 2733, 'Кран 23', '2010-12-30 11:11:32', 2833000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(440, 2734, 'Кран 23', '2010-12-30 11:11:31', 2834000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(441, 2799, 'Кран 23', '2010-12-30 11:11:35', 2899000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(442, 2865, 'Кран 23', '2010-12-30 11:11:37', 2965000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(443, 2939, 'Кран 23', '2010-12-30 11:11:40', 3039000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(444, 3010, 'Кран 23', '2010-12-30 11:11:42', 3110000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(445, 3086, 'Кран 23', '2010-12-30 11:11:45', 3186000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(446, 3156, 'Кран 23', '2010-12-30 11:11:46', 3256000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(447, 3229, 'Кран 23', '2010-12-30 11:11:49', 3329000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(448, 3230, 'Кран 23', '2010-12-30 11:11:50', 3330000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(449, 3231, 'Кран 23', '2010-12-30 11:11:50', 3331000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(450, 3232, 'Кран 23', '2010-12-30 11:11:51', 3332000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(451, 3233, 'Кран 23', '2010-12-30 11:11:53', 3333000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(452, 3234, 'Кран 23', '2010-12-30 11:11:51', 3334000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(453, 3235, 'Кран 23', '2010-12-30 11:11:51', 3335000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(454, 3236, 'Кран 23', '2010-12-30 11:11:50', 3336000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(455, 3237, 'Кран 23', '2010-12-30 11:11:51', 3337000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(456, 3238, 'Кран 23', '2010-12-30 11:11:51', 3338000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(457, 3239, 'Кран 23', '2010-12-30 11:11:51', 3339000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(458, 3240, 'Кран 23', '2010-12-30 11:11:52', 3340000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(459, 3241, 'Кран 23', '2010-12-30 11:11:52', 3341000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(460, 3242, 'Кран 23', '2010-12-30 11:11:52', 3342000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(461, 3243, 'Кран 23', '2010-12-30 11:11:53', 3343000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(462, 3244, 'Кран 23', '2010-12-30 11:11:52', 3344000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(463, 3245, 'Кран 23', '2010-12-30 11:11:52', 3345000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(464, 3246, 'Кран 23', '2010-12-30 11:11:52', 3346000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(465, 3247, 'Кран 23', '2010-12-30 11:11:52', 3347000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(466, 3248, 'Кран 23', '2010-12-30 11:11:52', 3348000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(467, 3249, 'Кран 23', '2010-12-30 11:11:52', 3349000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(468, 3250, 'Кран 23', '2010-12-30 11:11:51', 3350000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(469, 3251, 'Кран 23', '2010-12-30 11:11:52', 3351000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(470, 3252, 'Кран 23', '2010-12-30 11:11:52', 3352000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(471, 3253, 'Кран 23', '2010-12-30 11:11:52', 3353000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(472, 3254, 'Кран 23', '2010-12-30 11:11:52', 3354000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(473, 3255, 'Кран 23', '2010-12-30 11:11:52', 3355000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(474, 3256, 'Кран 23', '2010-12-30 11:11:52', 3356000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(475, 3257, 'Кран 23', '2010-12-30 11:11:52', 3357000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(476, 3258, 'Кран 23', '2010-12-30 11:11:52', 3358000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(477, 3259, 'Кран 23', '2010-12-30 11:11:52', 3359000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(478, 3260, 'Кран 23', '2010-12-30 11:11:51', 3360000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(479, 3261, 'Кран 23', '2010-12-30 11:11:53', 3361000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(480, 3262, 'Кран 23', '2010-12-30 11:11:52', 3362000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(481, 3263, 'Кран 23', '2010-12-30 11:11:53', 3363000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(482, 3264, 'Кран 23', '2010-12-30 11:11:52', 3364000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(483, 3265, 'Кран 23', '2010-12-30 11:11:52', 3365000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(484, 3266, 'Кран 23', '2010-12-30 11:11:52', 3366000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(485, 3267, 'Кран 23', '2010-12-30 11:11:52', 3367000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(486, 3268, 'Кран 23', '2010-12-30 11:11:52', 3368000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(487, 3269, 'Кран 23', '2010-12-30 11:11:53', 3369000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(488, 3270, 'Кран 23', '2010-12-30 11:11:53', 3370000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(489, 3271, 'Кран 23', '2010-12-30 11:11:57', 3371000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(490, 3272, 'Кран 23', '2010-12-30 11:11:53', 3372000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(491, 3273, 'Кран 23', '2010-12-30 11:11:53', 3373000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(492, 3274, 'Кран 23', '2010-12-30 11:11:53', 3374000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(493, 3275, 'Кран 23', '2010-12-30 11:11:53', 3375000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(494, 3276, 'Кран 23', '2010-12-30 11:11:52', 3376000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(495, 3277, 'Кран 23', '2010-12-30 11:11:52', 3377000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(496, 3278, 'Кран 23', '2010-12-30 11:11:52', 3378000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(497, 3279, 'Кран 23', '2010-12-30 11:11:52', 3379000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(498, 3280, 'Кран 23', '2010-12-30 11:11:52', 3380000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(499, 3281, 'Кран 23', '2010-12-30 11:11:52', 3381000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(500, 3282, 'Кран 23', '2010-12-30 11:11:52', 3382000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(501, 3283, 'Кран 23', '2010-12-30 11:11:52', 3383000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(502, 3284, 'Кран 23', '2010-12-30 11:11:52', 3384000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(503, 3285, 'Кран 23', '2010-12-30 11:11:52', 3385000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(504, 3286, 'Кран 23', '2010-12-30 11:11:52', 3386000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(505, 3287, 'Кран 23', '2010-12-30 11:11:52', 3387000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(506, 3288, 'Кран 23', '2010-12-30 11:11:53', 3388000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(507, 3289, 'Кран 23', '2010-12-30 11:11:52', 3389000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(508, 3290, 'Кран 23', '2010-12-30 11:11:53', 3390000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(509, 3291, 'Кран 23', '2010-12-30 11:11:53', 3391000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(510, 3292, 'Кран 23', '2010-12-30 11:11:52', 3392000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(511, 3293, 'Кран 23', '2010-12-30 11:11:53', 3393000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(512, 3294, 'Кран 23', '2010-12-30 11:11:53', 3394000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(513, 3295, 'Кран 23', '2010-12-30 11:11:52', 3395000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(514, 3296, 'Кран 23', '2010-12-30 11:11:54', 3396000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(515, 3297, 'Кран 23', '2010-12-30 11:11:53', 3397000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(516, 3298, 'Кран 23', '2010-12-30 11:11:54', 3398000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(517, 3299, 'Кран 23', '2010-12-30 11:11:54', 3399000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(518, 3300, 'Кран 23', '2010-12-30 11:11:54', 3400000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(519, 3301, 'Кран 23', '2010-12-30 11:11:54', 3401000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(520, 3302, 'Кран 23', '2010-12-30 11:11:53', 3402000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(521, 3303, 'Кран 23', '2010-12-30 11:11:53', 3403000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(522, 3304, 'Кран 23', '2010-12-30 11:11:53', 3404000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(523, 3305, 'Кран 23', '2010-12-30 11:11:53', 3405000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(524, 3306, 'Кран 23', '2010-12-30 11:11:52', 3406000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(525, 3307, 'Кран 23', '2010-12-30 11:11:53', 3407000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(526, 3308, 'Кран 23', '2010-12-30 11:11:53', 3408000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(527, 3309, 'Кран 23', '2010-12-30 11:11:53', 3409000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(528, 3310, 'Кран 23', '2010-12-30 11:11:53', 3410000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(529, 3311, 'Кран 23', '2010-12-30 11:11:53', 3411000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(530, 3312, 'Кран 23', '2010-12-30 11:11:53', 3412000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(531, 3313, 'Кран 23', '2010-12-30 11:11:52', 3413000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(532, 3314, 'Кран 23', '2010-12-30 11:11:53', 3414000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(533, 3315, 'Кран 23', '2010-12-30 11:11:53', 3415000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(534, 3316, 'Кран 23', '2010-12-30 11:11:53', 3416000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(535, 3317, 'Кран 23', '2010-12-30 11:11:52', 3417000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(536, 3318, 'Кран 23', '2010-12-30 11:11:53', 3418000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(537, 3319, 'Кран 23', '2010-12-30 11:11:53', 3419000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(538, 3320, 'Кран 23', '2010-12-30 11:11:53', 3420000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(539, 3321, 'Кран 23', '2010-12-30 11:11:53', 3421000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(540, 3322, 'Кран 23', '2010-12-30 11:11:53', 3422000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(541, 3323, 'Кран 23', '2010-12-30 11:11:53', 3423000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(542, 3324, 'Кран 23', '2010-12-30 11:11:52', 3424000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(543, 3325, 'Кран 23', '2010-12-30 11:11:54', 3425000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(544, 3326, 'Кран 23', '2010-12-30 11:11:53', 3426000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(545, 3327, 'Кран 23', '2010-12-30 11:11:53', 3427000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(546, 3328, 'Кран 23', '2010-12-30 11:11:53', 3428000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(547, 3329, 'Кран 23', '2010-12-30 13:01:42', 3429000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(548, 3330, 'Кран 23', '2010-12-30 13:01:43', 3430000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(549, 3399, 'Кран 23', '2010-12-30 13:01:44', 3499000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(550, 3477, 'Кран 23', '2010-12-30 13:01:48', 3577000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(551, 3552, 'Кран 23', '2010-12-30 13:01:51', 3652000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(552, 3616, 'Кран 23', '2010-12-30 13:01:52', 3716000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(553, 3688, 'Кран 23', '2010-12-30 13:01:56', 3788000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(554, 3754, 'Кран 23', '2010-12-30 13:01:57', 3854000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(555, 3821, 'Кран 23', '2010-12-30 13:02:01', 3921000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(556, 3822, 'Кран 23', '2010-12-30 13:02:01', 3922000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(557, 3823, 'Кран 23', '2010-12-30 13:02:02', 3923000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(558, 3824, 'Кран 23', '2010-12-30 13:02:00', 3924000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(559, 3825, 'Кран 23', '2010-12-30 13:02:01', 3925000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(560, 3826, 'Кран 23', '2010-12-30 13:02:01', 3926000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(561, 3827, 'Кран 23', '2010-12-30 13:02:00', 3927000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(562, 3828, 'Кран 23', '2010-12-30 13:02:01', 3928000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(563, 3829, 'Кран 23', '2010-12-30 13:02:01', 3929000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(564, 3830, 'Кран 23', '2010-12-30 13:02:01', 3930000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(565, 3831, 'Кран 23', '2010-12-30 13:02:01', 3931000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(566, 3832, 'Кран 23', '2010-12-30 13:02:01', 3932000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(567, 3833, 'Кран 23', '2010-12-30 13:02:01', 3933000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(568, 3834, 'Кран 23', '2010-12-30 13:02:00', 3934000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(569, 3835, 'Кран 23', '2010-12-30 13:02:01', 3935000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(570, 3836, 'Кран 23', '2010-12-30 13:02:02', 3936000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(571, 3837, 'Кран 23', '2010-12-30 13:02:01', 3937000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(572, 3838, 'Кран 23', '2010-12-30 13:02:01', 3938000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(573, 3839, 'Кран 23', '2010-12-30 13:02:01', 3939000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(574, 3840, 'Кран 23', '2010-12-30 13:02:01', 3940000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(575, 3841, 'Кран 23', '2010-12-30 13:02:01', 3941000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(576, 3842, 'Кран 23', '2010-12-30 13:02:01', 3942000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(577, 3843, 'Кран 23', '2010-12-30 13:02:01', 3943000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(578, 3844, 'Кран 23', '2010-12-30 13:02:02', 3944000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(579, 3845, 'Кран 23', '2010-12-30 13:02:02', 3945000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(580, 3846, 'Кран 23', '2010-12-30 13:02:02', 3946000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(581, 3847, 'Кран 23', '2010-12-30 13:02:02', 3947000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(582, 3848, 'Кран 23', '2010-12-30 13:02:02', 3948000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(583, 3849, 'Кран 23', '2010-12-30 13:02:02', 3949000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(584, 3850, 'Кран 23', '2010-12-30 13:02:02', 3950000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(585, 3851, 'Кран 23', '2010-12-30 13:02:02', 3951000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(586, 3852, 'Кран 23', '2010-12-30 13:02:02', 3952000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(587, 3853, 'Кран 23', '2010-12-30 13:02:02', 3953000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(588, 3854, 'Кран 23', '2010-12-30 13:02:02', 3954000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(589, 3855, 'Кран 23', '2010-12-30 13:02:02', 3955000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(590, 3856, 'Кран 23', '2010-12-30 13:02:02', 3956000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(591, 3857, 'Кран 23', '2010-12-30 13:02:02', 3957000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(592, 3858, 'Кран 23', '2010-12-30 13:02:02', 3958000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(593, 3859, 'Кран 23', '2010-12-30 13:02:02', 3959000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(594, 3860, 'Кран 23', '2010-12-30 13:02:02', 3960000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(595, 3861, 'Кран 23', '2010-12-30 13:02:02', 3961000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(596, 3862, 'Кран 23', '2010-12-30 13:02:02', 3962000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(597, 3863, 'Кран 23', '2010-12-30 13:02:02', 3963000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(598, 3864, 'Кран 23', '2010-12-30 13:02:01', 3964000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(599, 3865, 'Кран 23', '2010-12-30 13:02:03', 3965000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(600, 3866, 'Кран 23', '2010-12-30 13:02:02', 3966000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(601, 3867, 'Кран 23', '2010-12-30 13:02:02', 3967000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(602, 3868, 'Кран 23', '2010-12-30 13:02:01', 3968000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(603, 3869, 'Кран 23', '2010-12-30 13:02:02', 3969000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(604, 3870, 'Кран 23', '2010-12-30 13:02:02', 3970000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(605, 3871, 'Кран 23', '2010-12-30 13:02:02', 3971000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(606, 3872, 'Кран 23', '2010-12-30 13:02:02', 3972000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(607, 3873, 'Кран 23', '2010-12-30 13:02:03', 3973000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(608, 3874, 'Кран 23', '2010-12-30 13:02:03', 3974000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(609, 3875, 'Кран 23', '2010-12-30 13:02:03', 3975000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(610, 3876, 'Кран 23', '2010-12-30 13:02:03', 3976000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(611, 3877, 'Кран 23', '2010-12-30 13:02:03', 3977000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(612, 3878, 'Кран 23', '2010-12-30 13:02:03', 3978000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(613, 3879, 'Кран 23', '2010-12-30 13:02:03', 3979000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(614, 3880, 'Кран 23', '2010-12-30 13:02:03', 3980000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(615, 3881, 'Кран 23', '2010-12-30 13:02:03', 3981000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(616, 3882, 'Кран 23', '2010-12-30 13:02:03', 3982000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(617, 3883, 'Кран 23', '2010-12-30 13:02:03', 3983000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(618, 3884, 'Кран 23', '2010-12-30 13:02:03', 3984000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(619, 3885, 'Кран 23', '2010-12-30 13:02:03', 3985000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(620, 3886, 'Кран 23', '2010-12-30 13:02:02', 3986000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(621, 3887, 'Кран 23', '2010-12-30 13:02:02', 3987000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(622, 3888, 'Кран 23', '2010-12-30 13:02:03', 3988000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(623, 3889, 'Кран 23', '2010-12-30 13:02:02', 3989000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(624, 3890, 'Кран 23', '2010-12-30 13:02:03', 3990000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(625, 3891, 'Кран 23', '2010-12-30 13:02:03', 3991000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(626, 3892, 'Кран 23', '2010-12-30 13:02:03', 3992000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(627, 3893, 'Кран 23', '2010-12-30 13:02:03', 3993000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(628, 3894, 'Кран 23', '2010-12-30 13:02:04', 3994000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(629, 3895, 'Кран 23', '2010-12-30 13:02:03', 3995000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(630, 3896, 'Кран 23', '2010-12-30 13:02:03', 3996000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(631, 3897, 'Кран 23', '2010-12-30 13:02:03', 3997000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(632, 3898, 'Кран 23', '2010-12-30 13:02:03', 3998000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(633, 3899, 'Кран 23', '2010-12-30 13:02:04', 3999000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(634, 3900, 'Кран 23', '2010-12-30 13:02:04', 4000000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(635, 3901, 'Кран 23', '2010-12-30 13:02:04', 4001000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(636, 3902, 'Кран 23', '2010-12-30 13:02:04', 4002000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(637, 3903, 'Кран 23', '2010-12-30 13:02:04', 4003000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(638, 3904, 'Кран 23', '2010-12-30 13:02:04', 4004000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(639, 3905, 'Кран 23', '2010-12-30 13:02:04', 4005000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(640, 3906, 'Кран 23', '2010-12-30 13:02:04', 4006000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(641, 3907, 'Кран 23', '2010-12-30 13:02:04', 4007000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(642, 3908, 'Кран 23', '2010-12-30 13:02:04', 4008000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(643, 3909, 'Кран 23', '2010-12-30 13:02:04', 4009000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(644, 3910, 'Кран 23', '2010-12-30 13:02:04', 4010000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(645, 3911, 'Кран 23', '2010-12-30 13:02:04', 4011000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(646, 3912, 'Кран 23', '2010-12-30 13:02:05', 4012000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(647, 3913, 'Кран 23', '2010-12-30 13:02:04', 4013000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(648, 3914, 'Кран 23', '2010-12-30 13:02:04', 4014000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(649, 3915, 'Кран 23', '2010-12-30 13:02:04', 4015000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(650, 3916, 'Кран 23', '2010-12-30 13:02:04', 4016000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(651, 3917, 'Кран 23', '2010-12-30 13:02:04', 4017000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(652, 3918, 'Кран 23', '2010-12-30 13:02:04', 4018000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(653, 3919, 'Кран 23', '2010-12-30 13:02:04', 4019000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(654, 3920, 'Кран 23', '2010-12-30 13:02:04', 4020000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(655, 3921, 'Кран 23', '2010-12-30 13:10:41', 4021000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(656, 3922, 'Кран 23', '2010-12-30 13:10:43', 4022000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(657, 3982, 'Кран 23', '2010-12-30 13:10:45', 4082000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(658, 4129, 'Кран 23', '2010-12-30 13:10:50', 4229000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(659, 4217, 'Кран 23', '2010-12-30 13:10:55', 4317000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(660, 4282, 'Кран 23', '2010-12-30 13:10:56', 4382000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(661, 4347, 'Кран 23', '2010-12-30 13:10:58', 4447000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(662, 4422, 'Кран 23', '2010-12-30 13:11:01', 4522000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(663, 4430, 'Кран 23', '2010-12-30 13:11:01', 4530000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(664, 4431, 'Кран 23', '2010-12-30 13:11:01', 4531000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(665, 4432, 'Кран 23', '2010-12-30 13:11:01', 4532000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(666, 4433, 'Кран 23', '2010-12-30 13:11:01', 4533000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(667, 4434, 'Кран 23', '2010-12-30 13:11:02', 4534000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(668, 4435, 'Кран 23', '2010-12-30 13:11:02', 4535000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(669, 4436, 'Кран 23', '2010-12-30 13:11:02', 4536000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(670, 4437, 'Кран 23', '2010-12-30 13:11:02', 4537000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(671, 4438, 'Кран 23', '2010-12-30 13:11:02', 4538000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(672, 4439, 'Кран 23', '2010-12-30 13:11:02', 4539000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(673, 4440, 'Кран 23', '2010-12-30 13:11:02', 4540000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(674, 4441, 'Кран 23', '2010-12-30 13:11:02', 4541000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(675, 4442, 'Кран 23', '2010-12-30 13:11:03', 4542000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(676, 4443, 'Кран 23', '2010-12-30 13:11:03', 4543000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(677, 4444, 'Кран 23', '2010-12-30 13:11:03', 4544000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(678, 4445, 'Кран 23', '2010-12-30 13:11:02', 4545000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(679, 4446, 'Кран 23', '2010-12-30 13:11:02', 4546000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(680, 4447, 'Кран 23', '2010-12-30 13:11:03', 4547000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(681, 4448, 'Кран 23', '2010-12-30 13:11:03', 4548000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(682, 4449, 'Кран 23', '2010-12-30 13:11:02', 4549000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(683, 4450, 'Кран 23', '2010-12-30 13:11:02', 4550000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(684, 4451, 'Кран 23', '2010-12-30 13:11:02', 4551000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(685, 4452, 'Кран 23', '2010-12-30 13:11:02', 4552000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(686, 4453, 'Кран 23', '2010-12-30 13:11:03', 4553000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(687, 4454, 'Кран 23', '2010-12-30 13:11:02', 4554000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(688, 4455, 'Кран 23', '2010-12-30 13:11:03', 4555000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(689, 4456, 'Кран 23', '2010-12-30 13:11:03', 4556000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(690, 4457, 'Кран 23', '2010-12-30 13:11:02', 4557000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(691, 4458, 'Кран 23', '2010-12-30 13:11:02', 4558000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(692, 4459, 'Кран 23', '2010-12-30 13:11:02', 4559000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(693, 4460, 'Кран 23', '2010-12-30 13:11:03', 4560000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(694, 4461, 'Кран 23', '2010-12-30 13:11:02', 4561000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(695, 4462, 'Кран 23', '2010-12-30 13:11:03', 4562000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(696, 4463, 'Кран 23', '2010-12-30 13:11:03', 4563000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(697, 4464, 'Кран 23', '2010-12-30 13:11:04', 4564000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(698, 4465, 'Кран 23', '2010-12-30 13:11:04', 4565000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(699, 4466, 'Кран 23', '2010-12-30 13:11:04', 4566000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(700, 4467, 'Кран 23', '2010-12-30 13:11:03', 4567000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(701, 4468, 'Кран 23', '2010-12-30 13:11:03', 4568000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(702, 4469, 'Кран 23', '2010-12-30 13:11:04', 4569000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(703, 4470, 'Кран 23', '2010-12-30 13:11:03', 4570000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(704, 4471, 'Кран 23', '2010-12-30 13:11:04', 4571000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(705, 4472, 'Кран 23', '2010-12-30 13:11:04', 4572000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(706, 4473, 'Кран 23', '2010-12-30 13:11:04', 4573000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(707, 4474, 'Кран 23', '2010-12-30 13:11:03', 4574000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(708, 4475, 'Кран 23', '2010-12-30 13:11:03', 4575000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(709, 4476, 'Кран 23', '2010-12-30 13:11:03', 4576000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(710, 4477, 'Кран 23', '2010-12-30 13:11:04', 4577000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(711, 4478, 'Кран 23', '2010-12-30 13:11:03', 4578000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(712, 4479, 'Кран 23', '2010-12-30 13:11:03', 4579000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(713, 4480, 'Кран 23', '2010-12-30 13:11:04', 4580000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(714, 4481, 'Кран 23', '2010-12-30 13:11:03', 4581000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(715, 4482, 'Кран 23', '2010-12-30 13:11:04', 4582000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(716, 4483, 'Кран 23', '2010-12-30 13:11:04', 4583000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(717, 4484, 'Кран 23', '2010-12-30 13:11:03', 4584000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(718, 4485, 'Кран 23', '2010-12-30 13:11:04', 4585000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(719, 4486, 'Кран 23', '2010-12-30 13:11:03', 4586000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(720, 4487, 'Кран 23', '2010-12-30 13:11:04', 4587000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(721, 4488, 'Кран 23', '2010-12-30 13:11:03', 4588000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(722, 4489, 'Кран 23', '2010-12-30 13:11:04', 4589000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(723, 4490, 'Кран 23', '2010-12-30 13:11:05', 4590000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(724, 4491, 'Кран 23', '2010-12-30 13:11:04', 4591000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(725, 4492, 'Кран 23', '2010-12-30 13:11:05', 4592000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(726, 4493, 'Кран 23', '2010-12-30 13:11:05', 4593000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(727, 4494, 'Кран 23', '2010-12-30 13:11:04', 4594000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(728, 4495, 'Кран 23', '2010-12-30 13:11:04', 4595000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(729, 4496, 'Кран 23', '2010-12-30 13:11:05', 4596000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(730, 4497, 'Кран 23', '2010-12-30 13:11:05', 4597000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(731, 4498, 'Кран 23', '2010-12-30 13:11:04', 4598000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(732, 4499, 'Кран 23', '2010-12-30 13:11:05', 4599000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(733, 4500, 'Кран 23', '2010-12-30 13:11:04', 4600000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(734, 4501, 'Кран 23', '2010-12-30 13:11:04', 4601000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(735, 4502, 'Кран 23', '2010-12-30 13:11:05', 4602000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(736, 4503, 'Кран 23', '2010-12-30 13:11:04', 4603000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(737, 4504, 'Кран 23', '2010-12-30 13:11:05', 4604000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(738, 4505, 'Кран 23', '2010-12-30 13:11:04', 4605000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(739, 4506, 'Кран 23', '2010-12-30 13:11:04', 4606000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(740, 4507, 'Кран 23', '2010-12-30 13:11:05', 4607000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(741, 4508, 'Кран 23', '2010-12-30 13:11:04', 4608000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(742, 4509, 'Кран 23', '2010-12-30 13:11:05', 4609000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(743, 4510, 'Кран 23', '2010-12-30 13:11:05', 4610000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(744, 4511, 'Кран 23', '2010-12-30 13:11:04', 4611000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(745, 4512, 'Кран 23', '2010-12-30 13:11:04', 4612000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(746, 4513, 'Кран 23', '2010-12-30 13:11:05', 4613000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(747, 4514, 'Кран 23', '2010-12-30 13:11:04', 4614000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(748, 4515, 'Кран 23', '2010-12-30 13:11:05', 4615000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(749, 4516, 'Кран 23', '2010-12-30 13:11:05', 4616000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(750, 4517, 'Кран 23', '2010-12-30 13:11:04', 4617000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(751, 4518, 'Кран 23', '2010-12-30 13:11:06', 4618000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(752, 4519, 'Кран 23', '2010-12-30 13:11:05', 4619000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(753, 4520, 'Кран 23', '2010-12-30 13:11:06', 4620000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(754, 4521, 'Кран 23', '2010-12-30 13:11:05', 4621000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(755, 4522, 'Кран 23', '2010-12-30 13:11:06', 4622000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(756, 4523, 'Кран 23', '2010-12-30 13:11:05', 4623000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(757, 4524, 'Кран 23', '2010-12-30 13:11:05', 4624000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(758, 4525, 'Кран 23', '2010-12-30 13:11:06', 4625000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(759, 4526, 'Кран 23', '2010-12-30 13:11:05', 4626000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(760, 4527, 'Кран 23', '2010-12-30 13:11:06', 4627000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(761, 4528, 'Кран 23', '2010-12-30 13:11:06', 4628000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(762, 4529, 'Кран 23', '2010-12-30 13:11:06', 4629000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(763, 4530, 'Кран 23', '2010-12-30 14:10:50', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(764, 4531, 'Кран 23', '2010-12-30 14:10:54', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(765, 4532, 'Кран 23', '2010-12-30 14:10:55', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(766, 4533, 'Кран 23', '2010-12-30 14:11:05', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(767, 4534, 'Кран 23', '2010-12-30 14:11:07', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(768, 4535, 'Кран 23', '2010-12-30 14:11:08', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(769, 4536, 'Кран 23', '2010-12-30 14:11:08', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(770, 4537, 'Кран 23', '2010-12-30 14:11:09', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(771, 4538, 'Кран 23', '2010-12-30 14:11:12', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(772, 4539, 'Кран 23', '2010-12-30 14:11:13', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(773, 4540, 'Кран 23', '2010-12-30 14:11:15', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(774, 4541, 'Кран 23', '2010-12-30 14:11:16', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(775, 4542, 'Кран 23', '2010-12-30 14:11:18', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(776, 4543, 'Кран 23', '2010-12-30 14:11:18', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(777, 4544, 'Кран 23', '2010-12-30 14:11:19', 39900, 'yes', 'gross', '55', 'sovok', '', NULL),
(778, 1, 'Кран 23', '2011-01-11 17:30:09', 30800, 'yes', 'gross', '', '', '', NULL),
(779, 2, 'Кран 23', '2011-01-11 17:30:16', 30800, 'yes', 'gross', '', '', '', NULL),
(780, 3, 'Кран 23', '2011-01-11 17:30:22', 30800, 'yes', 'gross', '', '', '', NULL),
(781, 4, 'Кран 23', '2011-01-11 17:30:40', 123000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(782, 5, 'Кран 23', '2011-01-11 17:30:50', 30800, 'yes', 'gross', '', '', '', NULL),
(783, 6, 'Кран 23', '2011-01-11 17:30:55', 30800, 'yes', 'gross', '', '', '', NULL),
(784, 7, 'Кран 23', '2011-01-11 17:31:21', 30800, 'yes', 'gross', '', '', '', NULL),
(785, 8, 'Кран 23', '2011-01-11 17:31:50', 30800, 'yes', 'gross', '', '', '', NULL),
(786, 9, 'Кран 23', '2011-01-11 17:48:26', 124000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(787, 10, 'Кран 23', '2011-01-11 17:48:26', 125000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(788, 11, 'Кран 23', '2011-01-11 17:48:26', 126000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(789, 12, 'Кран 23', '2011-01-11 17:48:28', 127000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(790, 13, 'Кран 23', '2011-01-11 17:48:27', 128000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(791, 14, 'Кран 23', '2011-01-11 17:48:28', 129000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(792, 15, 'Кран 23', '2011-01-11 17:48:28', 130000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(793, 16, 'Кран 23', '2011-01-11 17:48:28', 131000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(794, 17, 'Кран 23', '2011-01-11 17:48:27', 132000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(795, 18, 'Кран 23', '2011-01-11 17:48:29', 133000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(796, 19, 'Кран 23', '2011-01-11 17:48:29', 134000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(797, 20, 'Кран 23', '2011-01-11 17:48:29', 135000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(798, 21, 'Кран 23', '2011-01-11 17:48:29', 136000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(799, 22, 'Кран 23', '2011-01-11 17:48:29', 137000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(800, 23, 'Кран 23', '2011-01-11 17:48:28', 138000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(801, 24, 'Кран 23', '2011-01-11 17:48:29', 139000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL),
(802, 25, 'Кран 23', '2011-01-11 17:48:29', 140000, 'yes', 'gross', 'mass field', '', 'begins from 123 t!..', NULL);
/*!40000 ALTER TABLE `weight_archive` ENABLE KEYS */;


# Dumping structure for procedure device_server.weight_archive_add
DELIMITER //
CREATE DEFINER=`root`@`localhost` PROCEDURE `weight_archive_add`(IN `plc_rec_id` INT, IN `device_name` TEXT, IN `time_stamp` DATETIME, IN `weight` INT, IN `stable` TEXT, IN `weight_type` TEXT, IN `tare_number` TEXT, IN `tare_type` TEXT, IN `addit_info` TEXT)
COMMENT 'Добавить запись взвешивания'
BEGIN
DECLARE rec_id INT DEFAULT 0;

DECLARE EXIT HANDLER FOR SQLEXCEPTION
BEGIN
ROLLBACK;
CALL return_fail('Ошибка при добавлении записи взвешивания');
END;

START TRANSACTION;

proc_body: BEGIN
SELECT
id
INTO
rec_id
FROM
weight_archive
WHERE
weight_archive.plc_rec_id = plc_rec_id AND
weight_archive.device_name = device_name AND
weight_archive.time_stamp = time_stamp AND
weight_archive.weight = weight AND
weight_archive.stable = stable AND
weight_archive.weight_type = weight_type AND
weight_archive.tare_number = tare_number AND
weight_archive.tare_type = tare_type AND
weight_archive.addit_info = addit_info
LIMIT 1;

IF(rec_id != 0) THEN
CALL return_ok(rec_id);
LEAVE proc_body;
END IF;

INSERT INTO weight_archive
(
plc_rec_id,
device_name,
time_stamp,
weight,
stable,
weight_type,
tare_number,
tare_type,
addit_info
)
VALUES
(
plc_rec_id,
device_name,
time_stamp,
weight,
stable,
weight_type,
tare_number,
tare_type,
addit_info
);

CALL return_ok(LAST_INSERT_ID());

END proc_body;

COMMIT;
END//
DELIMITER ;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

Can you check it, please? I mean import of cause :)
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Sorry for such big post.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
I used HeidiSQL 6.0.0.3626. With mysql.exe this script was imported well! Here is the bat-file script, with which I tested import that finished successfully:


@echo off

rem -------------------------------------------------------
chcp 1251
cls

rem -------------------------------------------------------
echo Данный файл предназначен для создания базы данных для корректной работы ПО АРМ.
echo Для выполнения скрипта создания базы данных необходимо:
echo - указать имя файла скрипта (обычно с расширением `sql`^)
echo - указать пароль пользователя 'root'
echo - указать порт сервера СУБД (обычно 3306 или 3307^)
echo - указать имя создаваемой базы данных
echo ВНИМАНИЕ! Файл скрипта должен находиться в той же папке, что и этот файл
echo ---------------------------------------------------
call :CHECK_FILE_EXISTS mysql.exe
if not %ERRORLEVEL% == 0 (
echo Скопируйте этот скрипт в папку установки MySQL (обычно C:\Program Files\MySQL Server\bin\^) или добавьте путь к папке установки MySQL в переменную PATH системы
call :QUIT 1
)

set /P SQL_SCRIPT=Введите имя файла скрипта:
call :CHECK_FILE_EXISTS %SQL_SCRIPT% || call :QUIT 1

set /P ROOT_PASSW=Введите пароль пользователя 'root':

set /P PORT=Введите порт сервера СУБД:

set /P DB_NAME=Введите имя создаваемой базы данных:

echo ---------------------------------------------------
echo Порт сервера СУБД: %PORT%
echo Создаваемая база данных: %DB_NAME%
echo Имя файла скрипта: %SQL_SCRIPT%
echo Пароль пользователя root: %ROOT_PASSW%
echo.

echo Выполнение действий...

if defined TMP (
set TMP_SCRIPT=%TMP%\tmp_sql_script.sql
) else if defined TEMP (
set TMP_SCRIPT=%TEMP%\tmp_sql_script.sql
) else (
set TMP_SCRIPT=tmp_sql_script.sql
)

echo CREATE DATABASE %DB_NAME% CHARSET UTF8; > %TMP_SCRIPT%
echo USE %DB_NAME%; >> %TMP_SCRIPT%
type %SQL_SCRIPT% >> %TMP_SCRIPT%

call :EXECUTE_SCRIPT %TMP_SCRIPT% %ROOT_PASSW% %PORT%
if %ERRORLEVEL% == 0 (
echo База данных `%DB_NAME%` успешно создана и инициализирована!
) else (
echo Ошибка при создании и инициализации базы данных `%DB_NAME%`!
call :QUIT 1
)

call :QUIT 0

rem -------------------------------------------------------
rem ПРОЦЕДУРЫ
rem -------------------------------------------------------
rem процедура для выполнения запроса к СУБД
rem IN: строка запроса
rem IN: пароль пользователя `root`
rem IN: порт сервера СУБД
:EXECUTE_QUERY
if not defined TMP_SCRIPT (
if defined TMP (
set TMP_SCRIPT=%TMP%\tmp_sql_script.sql
) else if defined TEMP (
set TMP_SCRIPT=%TEMP%\tmp_sql_script.sql
) else (
set TMP_SCRIPT=tmp_sql_script.sql
)
)

echo %~1 > %TMP_SCRIPT%

call :EXECUTE_SCRIPT %TMP_SCRIPT% %2 %3

if %ERRORLEVEL% == 0 (
echo Запрос %1 успешно выполнен!
exit /b 0
)

echo Ошибка при выполнении запроса %1!
exit /b 1

rem -------------------------------------------------------
rem процедура для выполнения файла SQL-скрипта
rem IN: имя файла скрипта
rem IN: пароль пользователя `root`
rem IN: порт сервера СУБД
:EXECUTE_SCRIPT
mysql --character-sets-dir=../share/charsets --default-character-set=utf8 -uroot -p%2 -P%3 mysql < "%1"
exit /b %ERRORLEVEL%

rem -------------------------------------------------------
rem процедура для проверки существования файла
rem IN: имя проверяемого файла
:CHECK_FILE_EXISTS
if not exist %1 (
echo Не найден файл `%1` в переменной PATH системы и в текущей папке
exit /b 1
)

exit /b 0

rem -------------------------------------------------------
rem процедура для завершения выполнения пакетного файла
rem IN: код возврата
:QUIT
echo ---------------------------------------------------
pause
exit %1



You can simply call:


mysql --character-sets-dir=../share/charsets --default-character-set=utf8 -uroot -p<your root password> -P<your server's port> mysql < "<your script file name with path>"



I don't know why this happens? Thanks.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
What's the error message? I'm hesitating to just copy and fire such a huge script here without knowing what it does exactly.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
And else you need add following lines in the above sql-script for simple import variant:


create database <your database> default charset utf8;
use <your database>;


Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
Please post the exact error message here. Thanks.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
MessageBox shows the following:


SQL Error (1005): Can't create table '.\qwerty\devices.frm' (errno: 150)
Foreign key constraint is incorrectly formed

Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
Ok, that should not happen as the above script disables foreign key checks, before the table is created. We already discussed that above.

Btw, the export was created with a 5.1 release - could you please try to recreate the export using the latest build? Just to be sure there is nothing which I already fixed. Thanks!
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
I'll try. But why mysql.exe eatssmilethis script well?
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Bad news! I use heidisql.r3630.exe and the same error occured unhappy
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
Did you really recreate the export?
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
Yes!
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
mysql.exe - analog of importer in heidisql - works fine with both versions of script. That is why I think that it is an import function bug. Any ideas?
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
No ideas. The SET FOREIGN_KEY_CHECKS=0; should do what needs to be done, and obviously does not do it. I don't know why.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
When I used mysqldump.exe and generated script contained the following:

header


-- MySQL dump 10.11
--
-- Host: localhost Database: redmine
-- ------------------------------------------------------
-- Server version 5.0.67-community-nt
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;



and the footer


/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2011-01-17 4:40:02



May be

/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;

makes sense.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
I tried to import script generated with mysqldump.exe and the error appeared.

Check this (mysql.exe works great with it):


-- MySQL dump 10.11
--
-- Host: localhost Database: redmine
-- ------------------------------------------------------
-- Server version 5.0.67-community-nt
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `attachments`
--

DELIMITER ;;
DELIMITER ;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2011-01-17 4:40:02



Nothing criminal here - only 2 lines with setting delimiter string.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
With that script you get the "Can't create table" error? There is no CREATE TABLE code in it so that can't happen?
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
You are right, there isn't. But problem is still exists.

Here is the output in log window for my huge script above:


USE `q`;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_delete`(IN `table_name` TEXT, IN `filter` TEXT) COMMENT 'Обобщенная процедура удаления данных' BEGIN CALL query_exec(query_build(CONCAT('DELETE FROM ', table_name), filter, '')); END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_get`(IN `table_names` TEXT, IN `column_names` TEXT, IN `filter` TEXT, IN `options` TEXT) COMMENT 'Обобщенная процедура получения данных' BEGIN CALL query_exec(query_build(CONCAT('SELECT ', column_names, ' FROM ', table_names), filter, options)); END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `common_update`(IN `table_name` TEXT, IN `value_list` TEXT, IN `filter` TEXT) COMMENT 'Обобщенная процедура обновления данных' BEGIN CALL query_exec(query_build(CONCAT('UPDATE ', table_name, ' SET ', value_list), filter, '')); END;;
# Dumping structure for table device_server.devices CREATE TABLE IF NOT EXISTS `devices` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор устройства', `name` varchar(255) NOT NULL COMMENT 'Имя устройства', `device_type` text NOT NULL COMMENT 'Тип устройства (vkt_6, vvts_4, ...)', `config` text COMMENT 'Настройки устройства', `device_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы устройств', `description` text COMMENT 'Описание устройства', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `devices_ibfk_1` (`device_group_id`), CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Таблица устройств';;
/* SQL Error (1005): Can't create table '.\q\devices.frm' (errno: 150) Foreign key constraint is incorrectly formed */
/* 0 rows affected, 0 rows found. Duration for 3 of 122 queries: 0,016 sec. */



I don't understand why comment and SQL-query on the same line


# Dumping structure for table device_server.devices CREATE TABLE IF NOT EXISTS `devices` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор устройства', `name` varchar(255) NOT NULL COMMENT 'Имя устройства', `device_type` text NOT NULL COMMENT 'Тип устройства (vkt_6, vvts_4, ...)', `config` text COMMENT 'Настройки устройства', `device_group_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор группы устройств', `description` text COMMENT 'Описание устройства', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `devices_ibfk_1` (`device_group_id`), CONSTRAINT `devices_ibfk_1` FOREIGN KEY (`device_group_id`) REFERENCES `device_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='Таблица устройств';;



Then I removed procedures before "CREATE TABLE devices..." (common_delete, common_get, ...) and the error appeared again but on another table. Here is the log:


USE `q`;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_add`(IN `device_name` TEXT, IN `device_type` TEXT, IN `group_name` TEXT, IN `config` TEXT, IN `description` TEXT) COMMENT 'Добавить устройство' BEGIN # переменные DECLARE exists_in_group TEXT DEFAULT ''; DECLARE exists_in_server TEXT DEFAULT ''; DECLARE group_id INT DEFAULT 0; DECLARE rec_id INT DEFAULT 0; # блок обработки исключения DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROLLBACK; CALL return_fail(CONCAT('Ошибка при добавлении устройства `', device_name, '` в группу устройств `', group_name, '`')); END; # тело процедуры START TRANSACTION; proc_body: BEGIN # не разрешаем пустое имя устройства IF(is_string_empty(device_name)) THEN CALL return_fail('Не указано имя устройства'); LEAVE proc_body; END IF; # не разрешаем дубликаты IF(devices_get_id(device_name) != 0) THEN SELECT device_groups.name, device_groups.server_name INTO exists_in_group, exists_in_server FROM device_groups, devices WHERE device_groups.id = devices.device_group_id AND devices.name = device_name; CALL return_fail(CONCAT('Устройство `', device_name, '` уже существует в группе `', exists_in_group, '` сервера `', exists_in_server, '`!')); LEAVE proc_body; END IF; # не разрешаем пустой тип устройства IF(is_string_empty(device_type)) THEN CALL return_fail('Не указан тип устройства!'); LEAVE proc_body; END IF; # не разрешаем пустое имя группы IF(is_string_empty(group_name)) THEN CALL return_fail('Не указана группа устройств!'); LEAVE proc_body; END IF; SELECT device_groups_get_id(group_name) INTO group_id; # не разрешаем добавлять устройства в несуществующие группы IF(group_id = 0) THEN CALL return_fail(CONCAT('Группа устройств `', group_name, '` не существует!')); LEAVE proc_body; END IF; INSER/* large SQL query (2,5 KB), snipped at 2 000 characters */
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete`(IN `device_name` TEXT) COMMENT 'Удалить устройство' BEGIN DELETE FROM devices WHERE devices.name = device_name; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete_all`() COMMENT 'Удалить все устройства' BEGIN DELETE FROM devices; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_delete_from_group`(IN `group_name` TEXT) COMMENT 'Удалить все устройства группы' BEGIN DELETE devices FROM devices, device_groups WHERE devices.device_group_id = device_groups.id AND device_groups.name = group_name; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get`(IN `device_name` TEXT) COMMENT 'Вернуть устройства' BEGIN SELECT * FROM devices WHERE devices.name = device_name; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get_all`() COMMENT 'Вернуть все устройства' BEGIN SELECT * FROM devices; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_get_for_group`(IN `group_name` TEXT) COMMENT 'Вернуть устройства указанной группы' BEGIN SELECT devices.* FROM devices, device_groups WHERE device_groups.id = devices.device_group_id AND device_groups.name = group_name; END;;
CREATE DEFINER=`root`@`localhost` FUNCTION `devices_get_id`(`device_name` TEXT) RETURNS int(11) COMMENT 'Вернуть идентификатор устройства' BEGIN DECLARE rec_id INT DEFAULT 0; SELECT id INTO rec_id FROM devices WHERE devices.name = device_name LIMIT 1; RETURN rec_id; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_rename`(IN `old_name` TEXT, IN `new_name` TEXT) COMMENT 'Переименовать устройство' BEGIN DECLARE exists_in_group TEXT DEFAULT ''; DECLARE exists_in_server TEXT DEFAULT ''; DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN ROLLBACK; CALL return_fail(CONCAT('Ошибка при переименовании устройства из `', old_name, '` в ', new_name, '`')); END; START TRANSACTION; proc_body: BEGIN # запрещаем пустое новое имя устройства IF(is_string_empty(new_name)) THEN CALL return_fail(CONCAT('Не указано новое имя устройства')); LEAVE proc_body; END IF; # запрещаем дубликаты IF(devices_get_id(new_name) != 0) THEN SELECT device_groups.name, device_groups.server_name INTO exists_in_group, exists_in_server FROM device_groups, devices WHERE device_groups.id = devices.device_group_id AND devices.name = new_name; CALL return_fail(CONCAT('Устройство `', new_name, '` уже существует в группе устройств `', exists_in_group, '` сервера `', exists_in_server, '`!')); LEAVE proc_body; END IF; # запрещаем пустое исходное имя устройства IF(is_string_empty(old_name)) THEN CALL return_fail(CONCAT('Не указано исходное имя устройства')); LEAVE proc_body; END IF; UPDATE devices SET name = new_name WHERE name = old_name; CALL return_ok(CONCAT('Устройство успешно переименовано с `', old_name, '` на `', new_name, '`!')); END proc_body; COMMIT; END;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_set_config`(IN `device_name` TEXT, IN `config` TEXT) COMMENT 'Изменить настройки устройства' BEGIN UPDATE devices SET devices.config = config WHERE devices.name = device_name; END;;
# Dumping structure for table device_server.device_control CREATE TABLE IF NOT EXISTS `device_control` ( `id` bigint(20) unsigned NOT NULL auto_increment COMMENT 'Уникальный идентификатор команды (для сохранения очередности команд)', `device_id` int(10) unsigned NOT NULL COMMENT 'Идентификатор устройства', `client_name` text NOT NULL COMMENT 'Уникальный идентификатор клиента, вызвавшего команду', `command` text NOT NULL COMMENT 'XML дерево с командой и ее параметрами', `response` text COMMENT 'XML дерево с ответом на команду', PRIMARY KEY (`id`), KEY `FK_device_control_devices` (`device_id`), CONSTRAINT `FK_device_control_devices` FOREIGN KEY (`device_id`) REFERENCES `devices` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=623 DEFAULT CHARSET=utf8 COMMENT='Таблица управления устройствами';;
/* SQL Error (1005): Can't create table '.\q\device_control.frm' (errno: 150) Foreign key constraint is incorrectly formed */
/* 0 rows affected, 0 rows found. Duration for 10 of 111 queries: 0,016 sec. */



If you search this script you will see that "device_control" table goes next to "devices" table. It's a bug. Can you check it out? Thanks.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
And more, table "devices" was not created while last test.
As you can see after I selected the "q" database and pressed
"Execute sql..." HeidiSQL begins to import "devices_add" procedure and skips "devices" table:


USE `q`;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `devices_add`(IN `de...

Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
As far as I can see you are missing the "devices" table at the point where the "device_control" table is created. Should not be a problem in a SET FOREIGN_KEY_CHECKS=0/1 wrap, if "devices" was created later, but the above code looks like you have
- removed the FOREIGN_KEY_CHECKS clauses
- and/or unchecked the "devices" table when exporting
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
It's bad that I can't attach here files - it's contents are too big to publish here. You can only believe me - I removed only that I described above.
I use mysql 5.0.67 if you interested in it. What version are you using? May be my version has some bugs. ...but mysqldump.exe works fine!! I don't understand what happens :(
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
May be everyone else can tell me what is it? Will seek further. Hope someone helps me.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
You could verify that the devices table is existing in the exported SQL - if not, that's the reason for the error.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
I found that when I commented out all procedures in the script job was done:


# -------------------------------------------------------- # Host: vesprom-2 # Server version: 5.0.67-community-nt # Server OS: Win32 # HeidiSQL version: 6.0.0.3630 # Date/time: 2011-01-17 15:43:49 # -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /* # Dumping structure for procedure device_server.common_delete DELIMITER // CREATE DEFINER=`root`@`localhost` PROCEDURE `common_delete`(IN `table_name` TEXT, IN `filter` TEXT) COMMENT 'Обобщенная процедура удаления данных' BEGIN CALL query_exec(query_build(CONCAT('DELETE FROM ', table_name), filter, '')); END// DELIMITER ; # Dumping structure for procedure device_server.common_get DELIMITER // CREATE DEFINER=`root`@`localhost` PROCEDURE `common_get`(IN `table_names` TEXT, IN `column_names` TEXT, IN `filter` TEXT, IN `options` TEXT) COMMENT 'Обобщенная процедура получения данных' BEGIN CALL query_exec(query_build(CONCAT('SELECT ', column_names, ' FROM ', table_names), filter, options)); END// DELIMITER ; # Dumping structure for procedure device_server.common_update DELIMITER // CREATE DEFINER=`root`@`localhost` PROCEDURE `common_update`(IN `table_name` TEXT, IN `value_list` TEXT, IN `filter` TEXT) COMMENT 'Обобщенная процедура обновления данных' BEGIN CALL query_exec(query_build(CONCAT('UPDATE ', table_name, ' SET ', value_list), filter, '')); END// DELIMITER ; */ # Dumping structure for table device_server.devices CREATE TABLE IF NOT EXISTS `devices` ( `id` int(10) unsigned NOT NULL auto_increment COMMENT 'Идентификатор устройства', `name` varchar(255) NOT NULL COMMENT 'Имя устройства', `device_type` t/* large SQL query (54,3 KB), snipped at 2 000 characters */
/* 0 rows affected, 0 rows found. Duration for 1 query: 0,000 sec. */



But log message looks strange. May be it reflects a bug?

I created another topic. I think it better to continue there. This page is overloaded and it seems that it's not a 'foreign key' bug. Especially since mysqldump.exe executes the script correctly.
Will wait answers.
Written by ansgar
4 years ago
5045 posts since Fri, 07 Apr 06
The log message says "1 query" but spits out at least two or three. You should check what delimiter you have set by clicking the main tool button with the red semicolon on it.
Written by sh2ka
4 years ago
35 posts since Mon, 29 Nov 10
It's amazing!!!! It's an answer. Thanks for your help. Somehow the delimiter was set ';;'. Sorry for headache that I made for you.

With best regards, Michael!
 

Please login to leave a reply, or register at first.