Fatal Error in Gdn_Database.Query();

Got error 28 from storage engine

select case when line.nodeTo is NULL then 0 when line2.nodeTo is NULL then 1 else 2 end as `depth`, case when line.nodeTo is NULL then '' when line2.nodeTo is NULL then '--' else '-----' end as `depthPrefix`, case when line.nodeTo is NULL then child.nodeIndex when line2.nodeTo is NULL then (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) else (select nodeIndex from GDN_WGNodes where _id= line2.nodeTo) end as `root`, case when line2.nodeTo is NULL then 0 else (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) end as `second`, rnd.* from GDN_WGNodes child left join GDN_WGNodes line on child._id = line.nodeFrom left join GDN_WGNodes parent on parent._id = line.nodeTo left join GDN_WGNodes line2 on line.nodeTo = line2.nodeFrom left join (SELECT * FROM GDN_WGNodes ORDER BY RAND()) rnd on rnd.nodeIndex = child.nodeIndex and rnd.nodeType = child.nodeType where child.nodeType = :childnodeType and child.nodeIndex > :childnodeIndex group by rnd.nodeIndex order by child.nodeIndex asc

The error occurred on or near: /home/wwwroot/www.vantk.com/library/database/class.database.php

410: 
411:                     if (!is_object($PDOStatement)) {
412:                         trigger_error(errorMessage('PDO Statement failed to prepare', $this->ClassName, 'Query', $this->getPDOErrorMessage($PDO->errorInfo())), E_USER_ERROR);
413:                     } elseif ($PDOStatement->execute($InputParameters) === false) {
414:                         trigger_error(errorMessage($this->getPDOErrorMessage($PDOStatement->errorInfo()), $this->ClassName, 'Query', $Sql), E_USER_ERROR);
415:                     }
416:                 } else {
417:                     $PDOStatement = $PDO->query($Sql);
418:                 }

Backtrace:

/home/wwwroot/www.vantk.com/library/database/class.database.phpPHP::Gdn_ErrorHandler();
[/home/wwwroot/www.vantk.com/library/database/class.database.php:414] PHP::trigger_error();
[/home/wwwroot/www.vantk.com/library/database/class.sqldriver.php:1716] Gdn_Database->query();
[/home/wwwroot/www.vantk.com/library/database/class.sqldriver.php:640] Gdn_SQLDriver->query();
[/home/wwwroot/www.vantk.com/plugins/Weiproject/WGNodesModel.php:110] Gdn_SQLDriver->get();
[/home/wwwroot/www.vantk.com/plugins/Weiproject/WGNodesModel.php:269] WGNodesModel->treeQuery();
[/home/wwwroot/www.vantk.com/plugins/Vantk/class.vantk.plugin.php:404] WGNodesModel->getNodesByTypeAndIndexRandom();
[/home/wwwroot/www.vantk.com/library/core/class.pluginmanager.php:894] VantkPlugin->Base_Render_Before();
[/home/wwwroot/www.vantk.com/library/core/class.pluginmanager.php:803] Gdn_PluginManager->callEventHandler();
[/home/wwwroot/www.vantk.com/library/core/class.pluggable.php:185] Gdn_PluginManager->callEventHandlers();
[/home/wwwroot/www.vantk.com/applications/dashboard/controllers/class.homecontroller.php:66] Gdn_Pluggable->__call();
[/home/wwwroot/www.vantk.com/applications/dashboard/controllers/class.homecontroller.php:66] HomeController->render();
[/home/wwwroot/www.vantk.com/applications/dashboard/controllers/class.homecontroller.php:66] HomeController->error();
[/home/wwwroot/www.vantk.com/library/core/class.dispatcher.php:329] PHP::call_user_func_array();
[/home/wwwroot/www.vantk.com/library/core/class.controller.php:1595] Gdn_Dispatcher->dispatch();
[/home/wwwroot/www.vantk.com/library/core/class.dispatcher.php:318] Gdn_Controller->renderException();
[/home/wwwroot/www.vantk.com/index.php:58] Gdn_Dispatcher->dispatch();

Variables in local scope:

[Sql] 'select case  when line.nodeTo is NULL then 0 when line2.nodeTo is NULL then 1 else 2 end as `depth`, case  when line.nodeTo is NULL then \'\' when line2.nodeTo is NULL then \'--\' else \'-----\' end as `depthPrefix`, case  when line.nodeTo is NULL then child.nodeIndex when line2.nodeTo is NULL then (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) else (select nodeIndex from GDN_WGNodes where _id= line2.nodeTo) end as `root`, case  when line2.nodeTo is NULL then 0 else (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) end as `second`, rnd.*
from GDN_WGNodes child
left join GDN_WGNodes line on child._id = line.nodeFrom
left join GDN_WGNodes parent on parent._id = line.nodeTo
left join GDN_WGNodes line2 on line.nodeTo = line2.nodeFrom
left join (SELECT * FROM GDN_WGNodes ORDER BY RAND()) rnd on rnd.nodeIndex = child.nodeIndex and rnd.nodeType = child.nodeType
where child.nodeType = :childnodeType
 and child.nodeIndex > :childnodeIndex
group by rnd.nodeIndex
order by child.nodeIndex asc'
[InputParameters] array (
  ':childnodeType' => 'rightEvent',
  ':childnodeIndex' => 0,
)
[Options] array (
  'Type' => 'select',
  'Slave' => NULL,
  'ReturnType' => 'DataSet',
)
[ReturnType] 'DataSet'
[tries] 2
[try] 0
[PDO] array (
)
[PDOStatement] array (
  'queryString' => 'select case  when line.nodeTo is NULL then 0 when line2.nodeTo is NULL then 1 else 2 end as `depth`, case  when line.nodeTo is NULL then \'\' when line2.nodeTo is NULL then \'--\' else \'-----\' end as `depthPrefix`, case  when line.nodeTo is NULL then child.nodeIndex when line2.nodeTo is NULL then (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) else (select nodeIndex from GDN_WGNodes where _id= line2.nodeTo) end as `root`, case  when line2.nodeTo is NULL then 0 else (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) end as `second`, rnd.*
from GDN_WGNodes child
left join GDN_WGNodes line on child._id = line.nodeFrom
left join GDN_WGNodes parent on parent._id = line.nodeTo
left join GDN_WGNodes line2 on line.nodeTo = line2.nodeFrom
left join (SELECT * FROM GDN_WGNodes ORDER BY RAND()) rnd on rnd.nodeIndex = child.nodeIndex and rnd.nodeType = child.nodeType
where child.nodeType = :childnodeType
 and child.nodeIndex > :childnodeIndex
group by rnd.nodeIndex
order by child.nodeIndex asc',
)

Need Help?

If you are a user of this website, you can report this message to a website administrator.

If you are an administrator of this website, you can get help at the Vanilla Community Forums.

Additional information for support personnel:

Array ( [0] => flannian-sql [1] => select case when line.nodeTo is NULL then 0 when line2.nodeTo is NULL then 1 else 2 end as `depth`, case when line.nodeTo is NULL then '' when line2.nodeTo is NULL then '--' else '-----' end as `depthPrefix`, case when line.nodeTo is NULL then child.nodeIndex when line2.nodeTo is NULL then (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) else (select nodeIndex from GDN_WGNodes where _id= line2.nodeTo) end as `root`, case when line2.nodeTo is NULL then 0 else (select nodeIndex from GDN_WGNodes where _id= line.nodeTo) end as `second`, rnd.* from GDN_WGNodes child left join GDN_WGNodes line on child._id = line.nodeFrom left join GDN_WGNodes parent on parent._id = line.nodeTo left join GDN_WGNodes line2 on line.nodeTo = line2.nodeFrom left join (SELECT * FROM GDN_WGNodes ORDER BY RAND()) rnd on rnd.nodeIndex = child.nodeIndex and rnd.nodeType = child.nodeType where child.nodeType = :childnodeType and child.nodeIndex > :childnodeIndex group by rnd.nodeIndex order by child.nodeIndex asc [2] => 00000 [3] => [4] => [5] => Array ( [0] => HY000 [1] => 1030 [2] => Got error 28 from storage engine ) )