READ ONLY FORUM: m23 :: makes software distribution easy Forum Index READ ONLY FORUM: m23 :: makes software distribution easy
The m23 discussion forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Not load Package list in Pool builder in rock 10.2 (100351)

 
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Tue Apr 06, 2010 13:04    Post subject: Not load Package list in Pool builder in rock 10.2 (100351) Reply with quote

Hi,
I installed a new server and when trying to load a previously saved package list in pool builder, always get the error:

Code:

DB_query: Could not execute SQL statement: SET GLOBAL group_concat_max_len = 268435456 ERROR:Access denied; you need the SUPER privilege for this operation


Rafa Luque
Back to top
Hauke



Joined: 02 Mar 2003
Posts: 1072

PostPosted: Wed Apr 07, 2010 6:18    Post subject: Reply with quote

Hi,

please change the function PKG_getClientPackages in the /m23/inc/packages.php as follows:

Code:
function PKG_getClientPackages($client, $key, $arr, $status="")
{
   CHECK_FW(CC_clientname, $client, CC_packagestatusOrEmpty, $status, CC_packageOrEmpty, $key);

   if (empty($key))
      $key="%";
   
   if (!empty($status))
      $add = " AND RIGHT(status,1) = '$status'";
   else
      $add = "";


   if ($arr)
      $sql = "SELECT package FROM `clientpackages` WHERE clientname='$client' AND package LIKE '$key' $add ORDER BY package";
   else
   {
      //Set the maximal amount of data that GROUP_CONCAT returns
      db_query("SET @@group_concat_max_len := @@max_allowed_packet");

      $sql ="
      SELECT GROUP_CONCAT(package SEPARATOR ' ') FROM `clientpackages` WHERE clientname='$client' AND package LIKE '$key' $add ORDER BY package";
   }

   $res = db_query($sql); //FW ok

   if ($arr)
      {
         $i=0;
         
         while ($data = mysql_fetch_row($res))
            $out[$i++]=$data[0];
      }
   else
      {
         $data = mysql_fetch_row($res);
         $out = $data[0];
/*         $out="";
         while ($data = mysql_fetch_row($res))
            $out.="$data[0] ";*/
      }
      
   return($out);
};


And CLIENT_getDebconfDB in /m23/inc/client.php according to:
Code:
function CLIENT_getDebconfDB($clientName)
{
   CHECK_FW(CC_clientname, $clientName);

   //Set the maximal amount of data that GROUP_CONCAT returns
   db_query("SET @@group_concat_max_len := @@max_allowed_packet");

   $result = db_query("SELECT GROUP_CONCAT(package, ' ', var, ' ', type, ' ', val SEPARATOR '\\n') FROM debconf WHERE client = '$clientName'");
   $line = mysql_fetch_row($result);
   return($line[0]);
}


Does it work after the changes?
_________________
Hauke Goos-Habermann
- project leader m23 (http://m23.sf.net) -
Jabber: dodgerm23@jabber.org

Schulung, Entwicklung und Support zu m23 und anderen OpenSource-Produkten: www.goos-habermann.de

Auch DU kannst etwas gegen Softwarepatente tun! www.patentfrei.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rluque



Joined: 11 Mar 2010
Posts: 3

PostPosted: Fri Apr 09, 2010 5:02    Post subject: Reply with quote

Hi,

It works fine.

Thanks

Rafa Luque
Back to top
View user's profile Send private message
Hauke



Joined: 02 Mar 2003
Posts: 1072

PostPosted: Fri Apr 09, 2010 5:12    Post subject: Reply with quote

This will be in the next release too.
_________________
Hauke Goos-Habermann
- project leader m23 (http://m23.sf.net) -
Jabber: dodgerm23@jabber.org

Schulung, Entwicklung und Support zu m23 und anderen OpenSource-Produkten: www.goos-habermann.de

Auch DU kannst etwas gegen Softwarepatente tun! www.patentfrei.de
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    READ ONLY FORUM: m23 :: makes software distribution easy Forum Index -> Bugs All times are GMT - 2 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group