@@ -1,5 +1,6 @@
DELIMITER $$
CREATE DEFINER=`root`@`localhost` FUNCTION `CurrYyyymmdd`() RETURNS varchar(8) CHARSET utf8mb4
+SQL SECURITY INVOKER
BEGIN
DECLARE ret VARCHAR(8);
@@ -3,6 +3,7 @@ DELIMITER //
CREATE FUNCTION DateDay ( date VARCHAR(8) )
RETURNS VARCHAR(10)
DECLARE ret VARCHAR(10);
set ret = concat(substring(date, 1,4),'.',substring(date, 5,2),'.',substring(date, 7,2));
CREATE FUNCTION DateMonth ( date VARCHAR(8) )
RETURNS VARCHAR(5)
DECLARE ret VARCHAR(5);
set ret = concat(substring(date, 3,2),'.',substring(date, 5,2)) ;
@@ -1,6 +1,7 @@
DELIMITER //
CREATE FUNCTION DateWeek ( date VARCHAR(8) )
RETURNS VARCHAR(8)
DECLARE month VARCHAR(5);
CREATE FUNCTION OneToCheck ( val CHAR(1) )
RETURNS VARCHAR(1)
DECLARE ret VARCHAR(1);
set ret = IF(val = '1', '√', '');
@@ -4,6 +4,7 @@ drop function if exists rdecimal;
CREATE FUNCTION rdecimal ( f float, p int )
RETURNS decimal(20,4)
DECLARE ret DECIMAL(20,4);
@@ -10,6 +10,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
_where varchar(386), _having varchar(386), _orderby varchar(64),
_branch int, _storage int)
Declare _sbal_date varchar(8);
_branch int, _storage int, _target int)
@@ -5,6 +5,7 @@ drop procedure if exists clo_branch_closing;
create procedure clo_branch_closing( _curr_date varchar(8), _branch int, _user int)
Declare _sales_day decimal(20,4) default "0.0000";
@@ -5,6 +5,7 @@ drop procedure if exists clo_pos_closing;
create procedure clo_pos_closing( _curr_date varchar(8), _branch int, _user int)
@@ -2,6 +2,7 @@
DROP PROCEDURE IF EXISTS fill_cal_format;
DELIMITER |
CREATE PROCEDURE fill_cal_format(dateStart DATE, dateEnd DATE)
declare i date ;
declare w int;
@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_item_bal;
create procedure fnc_curr_item_bal( _curr_date varchar(8), _storage int, _target int)
Declare _last_amt decimal(20,4) default "0.0000";
@@ -2,6 +2,7 @@ drop procedure if exists fnc_curr_reward_bal;
create procedure fnc_curr_reward_bal( _curr_date varchar(8), _branch int, _target int)
Declare _bal_date varchar(8);
@@ -4,6 +4,7 @@ drop procedure if exists conv_eyetest_sorder;
create procedure conv_eyetest_sorder()
-- Declare _json1 text;
@@ -6,6 +6,7 @@ _s1 varchar(32), _e1 varchar(32), _s2 varchar(32), _e2 varchar(32),
_s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
_having varchar(386), _orderby varchar(64),
_branch int, _storage int, _member_company_id int, _lt_filter int)
-- 로컬 변수 선언
@@ -65,6 +66,3 @@ FROM (
END //
DELIMITER ;
-
-CALL lt1_shop_dash_order_delayed('', '', '', '', '', '', '', '',
-'', '', '', '', '', '', 1, 1);
DECLARE start_date varchar(8);
DECLARE end_date varchar(8);
@@ -2,6 +2,7 @@ drop procedure if exists credit_bd_act;
create procedure credit_bd_act( _slip_code varchar(6), _target int, _act int)
Declare _created_on bigint ;
@@ -4,6 +4,7 @@ drop procedure if exists credit_bd_sync;
create procedure credit_bd_sync( _sdate varchar(8), _edate varchar(8) )
Declare _line_id int;
@@ -9,6 +9,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
@@ -8,6 +8,7 @@ _s3 varchar(32), _e3 varchar(32), _s4 varchar(32), _e4 varchar(32),
@@ -4,7 +4,8 @@ drop procedure if exists reward_bd_act;
create procedure reward_bd_act( _slip_code varchar(6), _target int, _act int)
-_procedure: BEGIN
+_procedure: SQL SECURITY INVOKER
+BEGIN
Declare _updated_on bigint ;
@@ -4,6 +4,7 @@ drop procedure if exists reward_bd_sync;
create procedure reward_bd_sync( _sdate varchar(8), _edate varchar(8) )
@@ -4,6 +4,7 @@ drop procedure if exists stock_io_act;
create procedure stock_io_act( _slip_code varchar(6), _target int, _act int)
@@ -4,6 +4,7 @@ drop procedure if exists stock_io_sync;
create procedure stock_io_sync( _sdate varchar(8), _edate varchar(8) )
CREATE TRIGGER credit_bd_insert AFTER INSERT ON dbr_credit_bd
- FOR EACH ROW BEGIN
+ FOR EACH ROW SQL SECURITY INVOKER
UPDATE dbr_company SET curr_credit_bal = new.bal_amt WHERE id = new.buyer_id;
END//
create procedure fnc_curr_reward_bal()
-- setup 변수들 --
DROP PROCEDURE IF EXISTS trunctables;
DELIMITER ;;
CREATE PROCEDURE trunctables(theDb varchar(64))
declare tname varchar(64);
declare table_except text;
@@ -8,6 +8,7 @@ ALTER TABLE `dbr_sort_menu`
CREATE PROCEDURE ResetAutoIncrement()
DECLARE done INT DEFAULT FALSE;
DECLARE tableName VARCHAR(255);
Declare _curr_bal decimal(20,4) default "0.0000";