Bug #5911 substring_index does not work in views

Submitted: 5 Oct 2004 22:49 Modified: 22 Oct 2004 7:45
Reporter: Harald Gölles Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:Ver 14.5 Distrib 5.0.1-alpha OS:Windows (Win95/Win98 (i32))
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[5 Oct 2004 22:49] Harald Gölles
Description:
substring_index does not work in views

How to repeat:
mysql> create table t (t time);
Query OK, 0 rows affected (0.03 sec)

mysql> create view v as select substring_index(t,':',2) from t;
Query OK, 0 rows affected (0.03 sec)

mysql> insert into t (t) values ('12:24:10');
Query OK, 1 row affected (0.05 sec)

mysql> select substring_index(t,':',2) from t;
+--------------------------+
| substring_index(t,':',2) |
+--------------------------+
| 12:24                    |
+--------------------------+
1 row in set (0.05 sec)

mysql> select substring_index(t,':',2) from v;
ERROR 1304 (42000): FUNCTION test.substr_index does not exist

mysql> status;
--------------
C:\mysql\bin\mysql  Ver 14.5 Distrib 5.0.1-alpha, for Win95/Win98 (i32)

Connection id:          2084
Current database:       test
Current user:           root@192.168.5.10
SSL:                    Not in use
Using delimiter:        ;
Server version:         5.0.1-alpha-nt
Protocol version:       10
Connection:             192.168.3.100 via TCP/IP
Client characterset:    latin1_swedish_ci
Server characterset:    latin1_swedish_ci
TCP port:               5000
Uptime:                 7 days 11 hours 35 min 20 sec
[6 Oct 2004 1:40] MySQL Verification Team
Verified against latest BK source tree on Linux/Windows.

Thank you for the bug report.
[21 Oct 2004 10:16] Oleksandr Byelkin
ChangeSet 
  1.1664 04/10/21 13:11:15 bell@sanja.is.com.ua +4 -0 
  fixed printing of substring_index (BUG#5911)
[22 Oct 2004 7:45] Oleksandr Byelkin
Thank you for bugreport! Bigfix pushed into our source repository and will be present in 
next server release.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.053 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.