Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.4.8
-
ubuntu = 1604 xenial /
php = 7.0.33 /
php-extension = mysqlnd 5.0.12-dev - 20150407 /
https://downloads.mariadb.org/mariadb/repositories/#distro=Ubuntu&distro_release=xenial--ubuntu_xenial&version=10.4
Description
[SOLVED] after replace "USING(...)" with explicit "JOIN ... ON(...)" all good.
after migrating to mariadb yesterday, i just noticed that some of my storedprocedures suddenly stop working. its related to "information_schema", for retreiving a table primary/foreign key column(s).
when using "select" syntax, if i listing column(s) name, the result is always zero.
but when using "*", it working properly.
#########################
SELECT * /* WORKING */
SELECT `column_name`,`constraint_type` /* NOT WORKING */
FROM `information_schema`.`table_constraints`
JOIN `information_schema`.`key_column_usage`
USING( `table_schema`,`table_name`,`constraint_name` )
WHERE `table_schema` = database() AND `table_name` = 'something'
AND (`constraint_type` = 'PRIMARY KEY' OR `constraint_type` = 'FOREIGN KEY')
ORDER BY `constraint_type` DESC, `column_name` ASC;
#########################
i have trying to run that sql from CLI, still not working (only "*" that work).
if running that sql on phpmyadmin/pma, it will always result nothing (using "*" or not).
But, when you change "database()" to explicit dbname, "*" will work.
there is something strange with "database()" too.
(sorry for my english)