select count(*) into @discard from

select count(*) into @discard from `dolphin7`.`sys_albums`

 

Can any one explain what these @discard statements are about?

The reason I as is I have a users Video album and objects that keep getting deleted.

 

Light man a fire keep him warm for a night, light him ON fire & he will be warm the rest of his life
Quote · 28 Aug 2010

@discard is a mysql variable not a statement. So something ahead of where you found this assigns something to that variable.

It could have easily been @this or @that or @thisisavariable. The @ indicates a variable and does nothing more than hold a value.

In many cases the word into would be followed by a table name in  which case the @discard would contain the name of a table, but the count indicates that it may also be a number.

In any case the @discard variable is assigned a value somewhere before that line.

I could not find that line anywhere, so i also do not know where you got it.

https://www.deanbassett.com
Quote · 28 Aug 2010

I checked the whole mysql 'thread' and this is what I found

 

Connect

Query select @@version_comment limit 1

Query select count(*) into @discard from `dolphin7`.`sys_albums`

Quit

 

 

I found the SQL statements that are deleting my album. I have posted them below. Now to figure out why it is doing this.  I think it may have to do with a limit on videos, but I don't know where that limit is coming from.

Light man a fire keep him warm for a night, light him ON fire & he will be warm the rest of his life
Quote · 28 Aug 2010
event_time user_host thread_id server_id command_type argument
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='144'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='106'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='52'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='53'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='108'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='107'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='141'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='142'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `RayVideoFiles`.`ID` as `medID`, `RayVideoFiles`.`Owner` as `medProfId`, `RayVideoFiles`.`Video` as `medExt`, `RayVideoFiles`.`Date` as `medDate`, `RayVideoFiles`.`Status` as `Approved`  
FROM `RayVideoFiles`


WHERE `RayVideoFiles`.`ID`='145'  LIMIT 1
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT    Name,
IDAction,
AllowedCount,
AllowedPeriodLen,
UNIX_TIMESTAMP(AllowedPeriodStart) as AllowedPeriodStart,
UNIX_TIMESTAMP(AllowedPeriodEnd) as AllowedPeriodEnd,
AdditionalParamValue
FROM    `sys_acl_actions`
LEFT JOIN `sys_acl_matrix`
ON    `sys_acl_matrix`.IDAction = `sys_acl_actions`.ID
AND `sys_acl_matrix`.IDLevel = 3
WHERE    `sys_acl_actions`.ID = 12
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `ID`, `Caption`, `Uri`, `Owner`, `Status`, `Date`, `ObjCount`, `AllowAlbumView`, `LastObjId` FROM `sys_albums` WHERE `Type` = 'bx_videos' AND `Owner` = '38'   ORDER BY `Date` DESC
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `id_object` FROM `sys_albums_objects`  WHERE `id_album`='2199'
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT `LastObjId` FROM `sys_albums` WHERE `ID`='2199' AND `Type`='bx_videos'
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query DELETE `sys_albums_objects`
FROM `sys_albums_objects`, `sys_albums`
WHERE `sys_albums_objects`.`id_album`=`sys_albums`.`ID`
AND `sys_albums`.`Type` = 'bx_videos' AND `sys_albums_objects`.`id_object` IN ('4', '5', '6', '11', '12', '18', '19', '21', '22', '25', '53', '106', '107', '108', '141', '142', '143', '144', '145')
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query SELECT MAX(`id_object`) FROM `sys_albums_objects` WHERE `id_album` = '2199'
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query UPDATE `sys_albums` SET `LastObjId`='0' WHERE `ID`='2199'
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query UPDATE `sys_albums` SET `ObjCount`=`ObjCount` - 19 WHERE `ID`='2199'
2010-08-28 15:53:55 root[root] @ localhost [] 774 0 Query DELETE FROM `sys_albums` WHERE `ID`='2199'
Light man a fire keep him warm for a night, light him ON fire & he will be warm the rest of his life
Quote · 28 Aug 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.