Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.3(EOL), 10.4(EOL), 10.5, 10.6, 10.7(EOL), 10.8(EOL), 10.9(EOL)
-
None
Description
If the definition of the view has select statement with RELEASE_LOCK and GROUP BY than RELEASE_LOCK return NULL.
Test:
CREATE TABLE t1 (i INT); |
INSERT INTO t1 VALUES (1),(2); |
|
SELECT GET_LOCK( 'foo', 0 ); |
CREATE VIEW v1 as SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f ; |
SELECT * FROM v1; |
|
DROP VIEW v1; |
DROP TABLE t1; |
Actual result:
SELECT GET_LOCK( 'foo', 0 ); |
GET_LOCK( 'foo', 0 ) |
1
|
CREATE VIEW v1 as SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f ; |
SELECT * FROM v1; |
f
|
NULL
|
NULL |
Expected result:
SELECT GET_LOCK( 'foo', 0 ); |
GET_LOCK( 'foo', 0 ) |
1
|
CREATE VIEW v1 as SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 GROUP BY f ; |
SELECT * FROM v1; |
f
|
NULL
|
1
|
Without GROUP BY result is correct:
SELECT GET_LOCK( 'foo', 0 ); |
GET_LOCK( 'foo', 0 ) |
1
|
CREATE VIEW v1 as SELECT HEX( RELEASE_LOCK( 'foo' ) ) AS f FROM t1 ; |
SELECT * FROM v1; |
f
|
1
|
NULL |
Attachments
Issue Links
- is part of
-
MDEV-27691 make working view-protocol
- Open