您好我的一个我的sql视图
CREATE OR REPLACE VIEW view_dr_server_actions_online AS
select
view_dr_server_actions.dr_request_id as dr_request_id,
view_dr_server_actions.server_id as server_id,
view_dr_server_actions.user_action as user_action,
view_dr_server_actions.action as action,
view_dr_server_actions.status as status,
view_dr_server_actions.appliance_id as appliance_id,
view_dr_server_actions.is_local as is_local,
view_servers.host_name as host_name,
view_servers.id as id,
view_servers.site_id as site_id,
view_servers.product_key as product_key,
view_servers.username as username,
view_servers.password as password,
view_servers.server_state as server_state,
view_servers.reachable_state as reachable_state,
view_servers.dr_plan_id as dr_plan_id,
view_servers.replication_site_id as replication_site_id,
view_servers.replication_appliance_id as replication_appliance_id,
view_servers.local_rpo as local_rpo,
view_servers.local_rto as local_rto,
view_servers.remote_rpo as remote_rpo,
view_servers.remote_rto as remote_rto,
view_servers.actual_local_rpo as actual_local_rpo,
view_servers.actual_local_rto as actual_local_rto,
view_servers.actual_remote_rpo as actual_remote_rpo,
view_servers.actual_remote_rto as actual_remote_rto,
view_servers.recovery_sequence_no as recovery_sequence_no,
view_servers.server_data as server_data,
get_product_data_of_server(view_dr_server_actions.dr_request_id) as drplan_data
from view_dr_server_actions
left join view_servers on view_servers.id = view_dr_server_actions.server_id
left join view_appliances_online on view_appliances_online.appliance_id = view_dr_server_actions.appliance_id
where server_id is not null
;
上面的视图返回0行但如果我运行其内部查询则返回结果。
我不确定究竟发生了什么,MySQL的问题请帮忙