%PDF- %PDF-
Direktori : /home/waritko/db_backups/databaze/information_schema/ |
Current File : //home/waritko/db_backups/databaze/information_schema/ROUTINES.sql |
-- MySQL dump 10.14 Distrib 5.5.60-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: information_schema -- ------------------------------------------------------ -- Server version 5.5.60-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- -- Table structure for table `ROUTINES` -- DROP TABLE IF EXISTS `ROUTINES`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TEMPORARY TABLE `ROUTINES` ( `SPECIFIC_NAME` varchar(64) NOT NULL DEFAULT '', `ROUTINE_CATALOG` varchar(512) NOT NULL DEFAULT '', `ROUTINE_SCHEMA` varchar(64) NOT NULL DEFAULT '', `ROUTINE_NAME` varchar(64) NOT NULL DEFAULT '', `ROUTINE_TYPE` varchar(9) NOT NULL DEFAULT '', `DATA_TYPE` varchar(64) NOT NULL DEFAULT '', `CHARACTER_MAXIMUM_LENGTH` int(21) DEFAULT NULL, `CHARACTER_OCTET_LENGTH` int(21) DEFAULT NULL, `NUMERIC_PRECISION` int(21) DEFAULT NULL, `NUMERIC_SCALE` int(21) DEFAULT NULL, `DATETIME_PRECISION` bigint(21) unsigned DEFAULT NULL, `CHARACTER_SET_NAME` varchar(64) DEFAULT NULL, `COLLATION_NAME` varchar(64) DEFAULT NULL, `DTD_IDENTIFIER` longtext, `ROUTINE_BODY` varchar(8) NOT NULL DEFAULT '', `ROUTINE_DEFINITION` longtext, `EXTERNAL_NAME` varchar(64) DEFAULT NULL, `EXTERNAL_LANGUAGE` varchar(64) DEFAULT NULL, `PARAMETER_STYLE` varchar(8) NOT NULL DEFAULT '', `IS_DETERMINISTIC` varchar(3) NOT NULL DEFAULT '', `SQL_DATA_ACCESS` varchar(64) NOT NULL DEFAULT '', `SQL_PATH` varchar(64) DEFAULT NULL, `SECURITY_TYPE` varchar(7) NOT NULL DEFAULT '', `CREATED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `LAST_ALTERED` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `SQL_MODE` varchar(8192) NOT NULL DEFAULT '', `ROUTINE_COMMENT` longtext NOT NULL, `DEFINER` varchar(189) NOT NULL DEFAULT '', `CHARACTER_SET_CLIENT` varchar(32) NOT NULL DEFAULT '', `COLLATION_CONNECTION` varchar(32) NOT NULL DEFAULT '', `DATABASE_COLLATION` varchar(32) NOT NULL DEFAULT '' ) ENGINE=Aria DEFAULT CHARSET=utf8 PAGE_CHECKSUM=0; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `ROUTINES` -- LOCK TABLES `ROUTINES` WRITE; /*!40000 ALTER TABLE `ROUTINES` DISABLE KEYS */; INSERT INTO `ROUTINES` VALUES ('update_user_stats_scrobble_count','def','gnufm','update_user_stats_scrobble_count','PROCEDURE','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SQL','main: BEGIN\n DECLARE s_count INT;\n UPDATE User_Stats SET scrobble_count = (scrobble_count + 1) WHERE userid = uid;\n IF ROW_COUNT() > 0 THEN\n LEAVE main;\n END IF;\n SELECT COUNT(userid) INTO s_count FROM Scrobbles WHERE userid = uid;\n INSERT INTO User_Stats(userid, scrobble_count) VALUES(uid, s_count);\n END main',NULL,NULL,'SQL','NO','CONTAINS SQL',NULL,'DEFINER','2018-10-05 13:29:01','2018-10-05 13:29:01','','','gnufm@localhost','latin1','latin1_swedish_ci','utf8_general_ci'),('SaveOrder','def','knih_monami','SaveOrder','PROCEDURE','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SQL','BEGIN\r\n DECLARE New_Id_Obj int;\r\n IF EXISTS (SELECT * FROM kosik WHERE sessid=v_SID) THEN\r\n INSERT INTO objednavky (id_usr, d_jmeno, d_adresa, d_mesto, d_psc, doprava, poznamka, cena_zbozi, postovne, cena_celkem, createdat) VALUES (v_id_usr, v_d_jmeno, v_d_adresa, v_d_mesto, v_d_psc, v_doprava, v_poznamka, v_cena, v_postovne, (v_cena + v_postovne), NOW());\r\n SET New_Id_Obj = LAST_INSERT_ID();\r\n INSERT INTO polozky (id_obj, id_kat, pocet, cena) SELECT New_Id_Obj, kos.id_kat, kos.pocet, IF(kat.cena_pohoda > 0, kat.cena_pohoda, kat.cena) FROM kosik kos, katalog kat WHERE sessid=v_SID AND kos.id_kat=kat.id_kat ORDER BY id_cart ASC;\r\n DELETE FROM kosik WHERE sessid=v_SID;\r\n SET last_id = New_Id_Obj;\r\n ELSE\r\n SET last_id = 0;\r\n END IF;\r\nEND',NULL,NULL,'SQL','NO','CONTAINS SQL',NULL,'DEFINER','2016-03-14 08:56:46','2016-03-14 08:56:46','','','root@localhost','utf8mb4','utf8mb4_general_ci','cp1250_general_ci'),('UpdatePemic','def','knih_monami','UpdatePemic','PROCEDURE','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SQL','BEGIN\r\n DECLARE Pocet_Vyskytu int;\r\n SET Pocet_Vyskytu = (SELECT COUNT(*) FROM katalog_update WHERE identif_nouni=v_identif_nouni);\r\n IF EXISTS (SELECT * FROM katalog_update WHERE id_pemic=v_id_pemic) THEN\r\n IF EXISTS (SELECT * FROM katalog_update WHERE identif_nouni=v_identif_nouni) THEN\r\n UPDATE katalog_update SET id_ktg=v_id_ktg, id_ktg_p=v_id_ktg_p, nazev=v_nazev, identif=CONCAT(v_identif_nouni,\'-\',(Pocet_Vyskytu+1)), identif_nouni=v_identif_nouni, podnazev=v_podnazev, autor=v_autor, nakladatel=v_nakladatel, edice=v_edice, jazyk=v_jazyk, anotace=v_anotace, isbn=v_isbn, ean=v_ean, stran=v_stran, vazba=v_vazba, vyska=v_vyska, sirka=v_sirka, tloustka=v_tloustka, hmotnost=v_hmotnost, planovane_vydani=v_planovane_vydani, vydano=v_vydano, dotisk=v_dotisk, obrazek=v_obrazek, dostupnost=v_dostupnost, zobraz=v_zobraz WHERE id_pemic = v_id_pemic;\r\n ELSE\r\n UPDATE katalog_update SET id_ktg=v_id_ktg, id_ktg_p=v_id_ktg_p, nazev=v_nazev, identif=v_identif_nouni, identif_nouni=v_identif_nouni, podnazev=v_podnazev, autor=v_autor, nakladatel=v_nakladatel, edice=v_edice, jazyk=v_jazyk, anotace=v_anotace, isbn=v_isbn, ean=v_ean, stran=v_stran, vazba=v_vazba, vyska=v_vyska, sirka=v_sirka, tloustka=v_tloustka, hmotnost=v_hmotnost, planovane_vydani=v_planovane_vydani, vydano=v_vydano, dotisk=v_dotisk, obrazek=v_obrazek, dostupnost=v_dostupnost, zobraz=v_zobraz WHERE id_pemic = v_id_pemic;\r\n END IF;\r\n SET update_pemic = \'UPDATE\';\r\n ELSE\r\n IF EXISTS (SELECT * FROM katalog_update WHERE identif_nouni=v_identif_nouni) THEN\r\n INSERT INTO katalog_update (id_pemic, id_ktg, id_ktg_p, nazev, identif, identif_nouni, podnazev, autor, nakladatel, edice, jazyk, anotace, isbn, ean, stran, vazba, vyska, sirka, tloustka, hmotnost, planovane_vydani, vydano, dotisk, obrazek, dostupnost, zobraz) VALUES (v_id_pemic, v_id_ktg, v_id_ktg_p, v_nazev, CONCAT(v_identif_nouni,\'-\',Pocet_Vyskytu), v_identif_nouni, v_podnazev, v_autor, v_nakladatel, v_edice, v_jazyk, v_anotace, v_isbn, v_ean, v_stran, v_vazba, v_vyska, v_sirka, v_tloustka, v_hmotnost, v_planovane_vydani, v_vydano, v_dotisk, v_obrazek, v_dostupnost, v_zobraz);\r\n ELSE\r\n INSERT INTO katalog_update (id_pemic, id_ktg, id_ktg_p, nazev, identif, identif_nouni, podnazev, autor, nakladatel, edice, jazyk, anotace, isbn, ean, stran, vazba, vyska, sirka, tloustka, hmotnost, planovane_vydani, vydano, dotisk, obrazek, dostupnost, zobraz) VALUES (v_id_pemic, v_id_ktg, v_id_ktg_p, v_nazev, v_identif_nouni, v_identif_nouni, v_podnazev, v_autor, v_nakladatel, v_edice, v_jazyk, v_anotace, v_isbn, v_ean, v_stran, v_vazba, v_vyska, v_sirka, v_tloustka, v_hmotnost, v_planovane_vydani, v_vydano, v_dotisk, v_obrazek, v_dostupnost, v_zobraz);\r\n END IF;\r\n SET update_pemic = \'INSERT\';\r\n END IF;\r\nEND',NULL,NULL,'SQL','NO','CONTAINS SQL',NULL,'DEFINER','2016-01-31 10:58:24','2016-01-31 10:58:24','NO_AUTO_VALUE_ON_ZERO','','knih_monami@localhost','utf8','utf8_general_ci','cp1250_general_ci'),('UpdatePemicFull','def','knih_monami','UpdatePemicFull','PROCEDURE','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'SQL','BEGIN\r\n DECLARE Pocet_Vyskytu int;\r\n SET Pocet_Vyskytu = (SELECT COUNT(*) FROM katalog_update WHERE identif_nouni=v_identif_nouni);\r\n IF EXISTS (SELECT * FROM katalog_update WHERE id_pemic=v_id_pemic) THEN\r\n UPDATE katalog_update SET jazyk=v_jazyk, anotace=v_anotace, isbn=v_isbn, ean=v_ean, stran=v_stran, vazba=v_vazba, vyska=v_vyska, sirka=v_sirka, tloustka=v_tloustka, hmotnost=v_hmotnost, planovane_vydani=v_planovane_vydani, vydano=v_vydano, dotisk=v_dotisk, obrazek=v_obrazek, dostupnost=v_dostupnost, zobraz=v_zobraz WHERE id_pemic = v_id_pemic;\r\n ELSE\r\n IF EXISTS (SELECT * FROM katalog_update WHERE identif_nouni=v_identif_nouni) THEN\r\n INSERT INTO katalog_update (id_pemic, id_ktg, id_ktg_p, nazev, identif, identif_nouni, podnazev, autor, nakladatel, edice, jazyk, anotace, isbn, ean, stran, vazba, vyska, sirka, tloustka, hmotnost, planovane_vydani, vydano, dotisk, obrazek, dostupnost, zobraz) VALUES (v_id_pemic, v_id_ktg, v_id_ktg_p, v_nazev, CONCAT(v_identif_nouni,\'-\',Pocet_Vyskytu), v_identif_nouni, v_podnazev, v_autor, v_nakladatel, v_edice, v_jazyk, v_anotace, v_isbn, v_ean, v_stran, v_vazba, v_vyska, v_sirka, v_tloustka, v_hmotnost, v_planovane_vydani, v_vydano, v_dotisk, v_obrazek, v_dostupnost, v_zobraz);\r\n ELSE\r\n INSERT INTO katalog_update (id_pemic, id_ktg, id_ktg_p, nazev, identif, identif_nouni, podnazev, autor, nakladatel, edice, jazyk, anotace, isbn, ean, stran, vazba, vyska, sirka, tloustka, hmotnost, planovane_vydani, vydano, dotisk, obrazek, dostupnost, zobraz) VALUES (v_id_pemic, v_id_ktg, v_id_ktg_p, v_nazev, v_identif_nouni, v_identif_nouni, v_podnazev, v_autor, v_nakladatel, v_edice, v_jazyk, v_anotace, v_isbn, v_ean, v_stran, v_vazba, v_vyska, v_sirka, v_tloustka, v_hmotnost, v_planovane_vydani, v_vydano, v_dotisk, v_obrazek, v_dostupnost, v_zobraz);\r\n END IF;\r\n END IF;\r\nEND',NULL,NULL,'SQL','NO','CONTAINS SQL',NULL,'DEFINER','2016-01-31 10:58:24','2016-01-31 10:58:24','NO_AUTO_VALUE_ON_ZERO','','knih_monami@localhost','utf8','utf8_general_ci','cp1250_general_ci'); /*!40000 ALTER TABLE `ROUTINES` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2018-11-09 4:25:11