La Paste
Create new paste
Pastes Archive
2024-03-06 17:12:11
copy
raw
download
CREATE ALGORITHM = UNDEFINED DEFINER = root `@` localhost SQL SECURITY DEFINER VIEW mlg_clients AS select distinct coalesce( mlg_nascustom.ip, nas.nasip, NULL ) AS nasname, coalesce( mlg_nascustom.name, nas.nasname, NULL ) AS shortname, 'other' AS type, NULL AS ports, coalesce( mlg_nascustom.secret, left( md5( inet_aton(nas.nasip) ), 12 ), NULL ) AS secret, NULL AS server from ( nas left join mlg_nascustom on( (nas.nasip = mlg_nascustom.ip) ) ) group by nas.nasname union select distinct mlg_nascustom.ip AS nasname, mlg_nascustom.name AS shortname, 'other' AS type, NULL AS ports, mlg_nascustom.secret AS secret, NULL AS server from ( mlg_nascustom left join nas on( (mlg_nascustom.ip = nas.nasip) ) ) where isnull(nas.nasname) group by mlg_nascustom.ip
↑