Unsupported Screen Size: The viewport size is too small for the theme to render properly.

bug in sqlwhere

  • This topic is empty.
Viewing 2 reply threads
  • Author
    Posts
    • #8591
      chakymf
      Member

      i have detected when sqlwhere has a primary key field then build a invalid sql statement

      example:

      table structure

      CodEmpresa,char(3),NOT NULL

      Ejercicio,char(4),NOT NULL

      Area,char(3),NOT NULL

      Serie,char(2),NOT NULL

      NumAlb,varchar(6),NOT NULL

      IdProp,varchar(20),NOT NULL

      Valor,varchar(50)

      PRIMARY KEY (CodEmpresa,Ejercicio,Area,Serie,NumAlb,IdProp,Valor)

      CodEmpresa='001'

      runs first query ok:

      select left(`CodEmpresa`,3), concat(sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),1,8),16,10)), sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),9,8),16,10)), sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),17,8),16,10)), sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),25,8),16,10))) as hashkey,count(*) as yog_cnt, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp` from `VENALBCAB_PROPS`where CodEmpresa=001 group by 1 order by 2

      fails in second query:

      select `CodEmpresa`, left(`Ejercicio`,3), concat(sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),1,8),16,10)), sum (conv (substring (md5 (concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),9,8),16,10)), sum (conv (substring (md5 (concat_ws (“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),17,8),16,10)), sum(conv(substring(md5(concat_ws(“,”, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp`, `Valor`)),25,8),16,10))) as hashkey, count(*) as yog_cnt, `CodEmpresa`, `Ejercicio`, `Area`, `Serie`, `NumAlb`, `IdProp` from `VENALBCAB_PROPS` where `CodEmpresa` like '001%' and ” group by 1,2 order by 3

    • #16337
      Ritesh
      Member

      I have forwarded the issue to my development team.

      BTW, if the data is not confidential then can you send me a copy of the same? It will be easier for us to find and fix the bug. You can mail them to [email protected]

    • #16338
      Ritesh
      Member

      The bug has been fixed in SQLyog 4.0 BETA 4. For more details, please visit:

      http://www.webyog.com/forums/index.php?act…f=2&t=977&st=0&

Viewing 2 reply threads
  • You must be logged in to reply to this topic.