bug?

bug?

am 24.05.2003 14:47:52 von NeoSolutions

SELECT g.id, g.name, count( a.id ) AS alb, left (g.info, 1) AS info
FROM grupes g
LEFT JOIN albumai a ON ( g.id = a.aid )
GROUP BY g.id
ORDER BY g.name

Such query doesn`t return "info" anymore, from 4.0.13 release. In
documentation I have found: Fixed bug in LEFT, RIGHT and MID when used with multi-byte character sets and some
GROUP BY queries. (Bug #314)
BUT! Everything for me seemed OK until this "bugfix". What`s wrong?


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: bug?

am 24.05.2003 21:53:24 von Sinisa Milivojevic

NeoSolutions writes:
> SELECT g.id, g.name, count( a.id ) AS alb, left (g.info, 1) AS info
> FROM grupes g
> LEFT JOIN albumai a ON ( g.id = a.aid )
> GROUP BY g.id
> ORDER BY g.name
>
> Such query doesn`t return "info" anymore, from 4.0.13 release. In
> documentation I have found: Fixed bug in LEFT, RIGHT and MID when used with multi-byte character sets and some
> GROUP BY queries. (Bug #314)
> BUT! Everything for me seemed OK until this "bugfix". What`s wrong?
>

Sorry, what do you mean by 'info' and which character set were you
using ???

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Re[2]: bug?

am 26.05.2003 13:02:39 von Sinisa Milivojevic

NeoSolutions writes:
> Hello Sinisa,
>
> In the mysql query i select: left (g.info, 1) AS info
> So this alias 'info' or 'left(g.info,1)' is empty string, but it
> should not be. I use cp1257 charset.
>
> How to fix:
> ------------
> Best regards,
> Vytautas Drumelis
> NeoSolutions project manager
> info@neosolutions.info
> http://www.neosolutions.info


Can you upload grupes and albumai tables to :

ftp://support.mysql.com:/pub/mysql/secret

and let us know a filename ???

--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: bug?

am 27.05.2003 09:43:42 von Dmitry Volkoff

On Sat, May 24, 2003 at 10:53:24PM +0300, Sinisa Milivojevic wrote:
> NeoSolutions writes:
> > SELECT g.id, g.name, count( a.id ) AS alb, left (g.info, 1) AS info
> > FROM grupes g
> > LEFT JOIN albumai a ON ( g.id = a.aid )
> > GROUP BY g.id
> > ORDER BY g.name
> >
> > Such query doesn`t return "info" anymore, from 4.0.13 release. In
> > documentation I have found: Fixed bug in LEFT, RIGHT and MID when used with multi-byte character sets and some
> > GROUP BY queries. (Bug #314)
> > BUT! Everything for me seemed OK until this "bugfix". What`s wrong?
> >
>
> Sorry, what do you mean by 'info' and which character set were you
> using ???

Hello, I have similar problem with mysql-4.0.13. I'm using cp1251
character set.

How-to-repeat:

mysql> create table test (a varchar(10) not null);
Query OK, 0 rows affected (0.02 sec)

mysql> insert into test values ("a"),("ab"),("abc");
Query OK, 3 rows affected (0.01 sec)
Records: 3 Duplicates: 0 Warnings: 0

mysql> select * from test;
+-----+
| a |
+-----+
| a |
| ab |
| abc |
+-----+
3 rows in set (0.00 sec)

mysql> select a, left(a,1) as b from test;
+-----+---+
| a | b |
+-----+---+
| a | a |
| ab | a |
| abc | a |
+-----+---+
3 rows in set (0.00 sec)

Here is the bug:

mysql> select a, left(a,1) as b from test group by a;
+-----+---+
| a | b |
+-----+---+
| a | |
| ab | |
| abc | |
+-----+---+
3 rows in set (0.00 sec)

And another one:

mysql> select a, left(a,1) as b from test group by b;
+---+---+
| a | b |
+---+---+
| a | |
+---+---+
1 row in set (0.00 sec)

--

DV

--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: bug?

am 27.05.2003 11:32:09 von Alexander Keremidarski

Dmitry,

Dmitry Volkoff wrote:


> Hello, I have similar problem with mysql-4.0.13. I'm using cp1251
> character set.
>
> How-to-repeat:

Thank you a lot for perfect test case.
I was able to repeat it within seconds (I have running mysqld with cp1251 for
obvious reasons)

It is now entered in our Bugs Database as http://bugs.mysql.com/514

Refer to this URL for further development.

Âñåãî õîðîøåãî

--
I'm MySQL certified. Are you? -- http://www.mysql.com/certification
For technical support contracts, visit https://order.mysql.com/?ref=msal
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Alexander Keremidarski
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer
/_/ /_/\_, /___/\___\_\___/ Sofia, Bulgaria
<___/ www.mysql.com




--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org

Re: Re[2]: bug?

am 29.05.2003 20:53:17 von Sinisa Milivojevic

NeoSolutions writes:
> Hello Sinisa,
>
> In the mysql query i select: left (g.info, 1) AS info
> So this alias 'info' or 'left(g.info,1)' is empty string, but it
> should not be. I use cp1257 charset.
>
> Saturday, May 24, 2003, 10:53:24 PM, you wrote:
>
>
> ------------
> Best regards,
> Vytautas Drumelis
> NeoSolutions project manager
> info@neosolutions.info
> http://www.neosolutions.info
>

Hi!

I was not capable to repeat a problem you report with either latin1 or
cp1257 as default charsets.

I always get the same result:
[~]$ mysql bug -e "SELECT g.id, g.name, count( a.id ) AS alb, left (g.info, 1) AS info FROM grupes g LEFT JOIN albumai a ON ( g.id = a.aid ) GROUP BY g.id ORDER BY g.name"
+-----+------+-----+------+
| id | name | alb | info |
+-----+------+-----+------+
| 622 | aaa | 0 | a |
+-----+------+-----+------+
[~]$ mysqladmin shutdown
[~]$ mysql bug -e "SELECT g.id, g.name, count( a.id ) AS alb, left (g.info, 1) AS info FROM grupes g LEFT JOIN albumai a ON ( g.id = a.aid ) GROUP BY g.id ORDER BY g.name"
+-----+------+-----+------+
| id | name | alb | info |
+-----+------+-----+------+
| 622 | aaa | 0 | a |
+-----+------+-----+------+



--

Regards,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, FullTime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org