daily pastebin goal
15%
SHARE
TWEET

Untitled

a guest Dec 10th, 2018 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use cloud_fight;
  2.  
  3. drop procedure if exists `konami`;
  4.  
  5. drop function if exists `rand_string`;
  6.  
  7. delimiter //  
  8. CREATE FUNCTION `rand_string`(n INT) RETURNS varchar(255)
  9. BEGIN
  10.      DECLARE chars_str varchar(255) DEFAULT 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789rew';
  11.      DECLARE return_str varchar(255) DEFAULT '';
  12.      DECLARE i INT DEFAULT 0;
  13.      while i < n do
  14.          SET return_str = concat(return_str,substring(chars_str , FLOOR(1 + RAND()*64 ),1));
  15.          SET i = i + 1;
  16.      END while;
  17.      RETURN return_str;
  18.  END //
  19.  
  20. delimiter $$
  21. create procedure konami()
  22. begin
  23. declare q int default 1;
  24. while q<=2 DO
  25. set @N=rand_string(64);
  26. insert into fight_user (user_guid , first_name , last_name , user_name , nick_name , gender , city , province , country , head_img_url , created_at , last_updated) values (@N, '' , '' , '' , rand_string(5) , '2' , 'bj' , 'bj' , 'cn' , '' , now() , now());
  27. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'WECHAT_UNIONID' , now() , now() , 1 from fight_user where user_guid = @N;
  28. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'MP_OPENID' , now() , now() , 1 from fight_user where user_guid = @N;
  29. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'PA_OPENID' , now() , now() , 1 from fight_user where user_guid = @N;
  30. set q=q+1;
  31. end while;
  32. end $$
  33. call konami();
  34.    
  35. drop function if exists `rand_string`;
  36. delimiter //  
  37. CREATE FUNCTION `rand_string`(n INT) RETURNS varchar(255)
  38. BEGIN
  39.      DECLARE chars_str varchar(255) DEFAULT 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789rew';
  40.      DECLARE return_str varchar(255) DEFAULT '';
  41.      DECLARE i INT DEFAULT 0;
  42.      while i < n do
  43.          SET return_str = concat(return_str,substring(chars_str , FLOOR(1 + RAND()*64 ),1));
  44.          SET i = i + 1;
  45.      END while;
  46.      RETURN return_str;
  47.  END //
  48.  
  49. drop procedure if exists `konami`;
  50. delimiter $$
  51. create procedure konami()
  52. begin
  53. declare q int default 1;
  54. while q<=2 DO
  55. set @N=rand_string(64);
  56. insert into fight_user (user_guid , first_name , last_name , user_name , nick_name , gender , city , province , country , head_img_url , created_at , last_updated) values (@N, '' , '' , '' , rand_string(5) , '2' , 'bj' , 'bj' , 'cn' , '' , now() , now());
  57. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'WECHAT_UNIONID' , now() , now() , 1 from fight_user where user_guid = @N;
  58. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'MP_OPENID' , now() , now() , 1 from fight_user where user_guid = @N;
  59. insert into fight_user_cake (fight_user_id , t_id , third_party_user_id , type , created_at , last_updated , status) select id , '2' , rand_string(20) , 'PA_OPENID' , now() , now() , 1 from fight_user where user_guid = @N;
  60. set q=q+1;
  61. end while;
  62. end $$
  63. call konami();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top