mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
Merge branch 'master' into Playerbot
This commit is contained in:
6
data/sql/updates/db_world/2024_11_16_00.sql
Normal file
6
data/sql/updates/db_world/2024_11_16_00.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- DB update 2024_11_15_04 -> 2024_11_16_00
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24979) AND (`source_type` = 0) AND (`id` IN (0, 1));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(24979, 0, 0, 0, 1, 0, 100, 0, 3000, 3000, 5000, 5000, 0, 0, 11, 45101, 0, 0, 0, 0, 0, 19, 5202, 26, 0, 0, 0, 0, 0, 0, 'Dawnblade Marksman - Out of Combat - Cast \'Flaming Arrow\''),
|
||||
(24979, 0, 1, 0, 0, 0, 100, 0, 0, 0, 2000, 2000, 0, 0, 11, 6660, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dawnblade Marksman - In Combat - Cast \'Shoot\'');
|
||||
3
data/sql/updates/db_world/2024_11_16_01.sql
Normal file
3
data/sql/updates/db_world/2024_11_16_01.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_16_00 -> 2024_11_16_01
|
||||
--
|
||||
UPDATE `creature_template_movement` SET `Rooted` = 1 WHERE `CreatureId` = 25741;
|
||||
210
data/sql/updates/db_world/2024_11_16_02.sql
Normal file
210
data/sql/updates/db_world/2024_11_16_02.sql
Normal file
@@ -0,0 +1,210 @@
|
||||
-- DB update 2024_11_16_01 -> 2024_11_16_02
|
||||
-- Update creature 'Lunar - Misc' with sniffed values
|
||||
-- updated spawns
|
||||
DELETE FROM `creature` WHERE (`id1` IN (15892, 15898, 15895, 15897, 15891, 15961, 15864, 15909))
|
||||
AND (`guid` IN (61988, 61989, 61990, 61991, 61992, 61993, 85532, 85533, 85534, 85535, 85536, 85537, 85538, 85539, 85540, 85541, 85542, 85543, 91572, 91593, 91594, 91595, 91596, 91597, 91599, 91600, 91601, 91602, 91604, 91605, 91606, 91607, 91608, 91609, 91611, 91612, 91613, 91614, 91615, 91622, 91623, 91624, 91625, 91626, 91627, 91628, 91629, 91632, 91633, 91634, 91635, 91636, 91637, 91641, 91643, 91645, 91647, 91649, 91650, 91660, 91667, 91677, 91678, 91679, 91680, 91681, 91682, 91683, 91684, 91685, 91686, 91687, 91688, 91689, 97677, 97678, 97679, 97680, 97681, 97682, 97683, 97684, 97685, 97686, 97687, 97688, 97689, 97690, 97691, 97692, 97693, 97694));
|
||||
INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
|
||||
(61988, 15892, 571, 1, 1, 0, 5825.60205078125, 642.9195556640625, 647.87646484375, 3.106686115264892578, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(61989, 15892, 571, 1, 1, 0, 5820.26171875, 646.169921875, 647.85247802734375, 5.235987663269042968, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(61990, 15892, 571, 1, 1, 0, 5819.78271484375, 639.33160400390625, 647.9127197265625, 1.029744267463684082, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(61991, 15898, 571, 1, 1, 0, 5827.1474609375, 654.62579345703125, 647.57769775390625, 3.159045934677124023, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(61992, 15895, 571, 1, 1, 0, 5824.6513671875, 657.0712890625, 647.6138916015625, 3.246312379837036132, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(61993, 15897, 571, 1, 1, 0, 5821.92236328125, 642.78399658203125, 648.1099853515625, 5.16617441177368164, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85532, 15892, 530, 1, 1, 0, -4014.533447265625, -11839.49609375, 0.187831342220306396, 2.617993831634521484, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85533, 15892, 530, 1, 1, 0, -4017.630615234375, -11834.3017578125, 0.171095341444015502, 4.747295379638671875, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85534, 15892, 530, 1, 1, 0, -4020.615478515625, -11839.400390625, 0.120863333344459533, 0.471238881349563598, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85535, 15892, 1, 1, 1, 0, 10146.7939453125, 2603.149169921875, 1330.908447265625, 6.038839340209960937, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85536, 15892, 1, 1, 1, 0, 10151.23046875, 2598.932861328125, 1330.908447265625, 1.780235767364501953, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85537, 15892, 1, 1, 1, 0, 10153.1904296875, 2604.514892578125, 1330.908447265625, 3.822271108627319335, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85538, 15898, 530, 1, 1, 0, -4020.0556640625, -11848.4189453125, 0.105093337595462799, 4.677482128143310546, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85539, 15898, 1, 1, 1, 0, 10148.0283203125, 2572.626708984375, 1320.6966552734375, 4.188790321350097656, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85540, 15895, 530, 1, 1, 0, -4014.714111328125, -11848.544921875, 0.16346733272075653, 4.799655437469482421, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85541, 15895, 1, 1, 1, 0, 10153.5849609375, 2593.450439453125, 1330.8414306640625, 4.572762489318847656, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(85542, 15897, 530, 1, 1, 0, -4017.510986328125, -11837.7255859375, 0.159306332468986511, 4.398229598999023437, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(85543, 15897, 1, 1, 1, 0, 10150.49609375, 2602.14306640625, 1330.908447265625, 1.762782573699951171, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91572, 15895, 0, 1, 1, 0, 1647.509765625, 243.6931915283203125, 62.67490386962890625, 5.829399585723876953, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91593, 15898, 1, 1, 1, 0, 1971.18408203125, -4259.455078125, 32.44256591796875, 4.014257431030273437, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91594, 15897, 0, 1, 1, 0, 1642.070556640625, 239.8388671875, 62.67490386962890625, 0.802851438522338867, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91595, 15891, 1, 1, 1, 0, 1614.232666015625, -4395.60400390625, 10.61059856414794921, 3.298672199249267578, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91596, 15897, 1, 1, 1, 0, -1031.9500732421875, -230.513290405273437, 160.2429351806640625, 3.96189737319946289, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91597, 15891, 1, 1, 1, 0, -1036.3294677734375, -233.698348999023437, 160.017333984375, 0.680678427219390869, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91599, 15891, 1, 1, 1, 0, -1291.302734375, 116.1800689697265625, 131.216705322265625, 5.148721218109130859, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91600, 15898, 1, 1, 1, 0, -1043.6627197265625, -219.75244140625, 159.8617095947265625, 2.687807083129882812, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91601, 15891, 0, 1, 1, 0, 1638.0010986328125, 239.885528564453125, 62.67490386962890625, 6.2657318115234375, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91602, 15898, 0, 1, 1, 0, 1647.368896484375, 235.684844970703125, 62.67490386962890625, 0.471238881349563598, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91604, 15891, 1, 1, 1, 0, -1032.32275390625, -224.263397216796875, 160.517608642578125, 4.764749050140380859, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91605, 15891, 0, 1, 1, 0, 1600.3482666015625, 232.9897003173828125, -52.0698204040527343, 5.25344085693359375, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91606, 15891, 0, 1, 1, 0, 1643.9556884765625, 243.0946807861328125, 62.67490386962890625, 4.188790321350097656, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91607, 15891, 0, 1, 1, 0, 1643.935302734375, 236.5445404052734375, 62.67490386962890625, 2.111848354339599609, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91608, 15895, 1, 1, 1, 0, 1974.703125, -4264.861328125, 32.42264175415039062, 3.543018341064453125, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91609, 15891, 1, 1, 1, 0, 1976.9635009765625, -4253.4775390625, 32.07609176635742187, 5.916666030883789062, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91611, 15891, 1, 1, 1, 0, 1988.40625, -4252.625, 31.86708259582519531, 3.700098037719726562, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91612, 15897, 1, 1, 1, 0, 1983.0504150390625, -4255.88525390625, 31.99672126770019531, 2.076941728591918945, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91613, 15895, 1, 1, 1, 0, -1046.25048828125, -225.606170654296875, 160.0530548095703125, 2.862339973449707031, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91614, 15891, 1, 1, 1, 0, -1027.02783203125, -233.016006469726562, 160.0627899169921875, 2.58308720588684082, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91615, 15891, 1, 1, 1, 0, 1983.6597900390625, -4262.07275390625, 32.36765670776367187, 1.675516128540039062, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91622, 15892, 0, 1, 1, 0, -8745.396484375, 1078.029541015625, 90.8636016845703125, 4.066617012023925781, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91623, 15892, 0, 1, 1, 0, -4894.1787109375, -958.1534423828125, 501.535125732421875, 2.862339973449707031, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91624, 15892, 0, 1, 1, 0, -4657.50927734375, -957.5965576171875, 500.460845947265625, 2.792526721954345703, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91625, 15898, 0, 1, 1, 0, -8737.6689453125, 1074.7777099609375, 90.79186248779296875, 4.660028934478759765, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91626, 15895, 0, 1, 1, 0, -4654.880859375, -941.65606689453125, 502.229339599609375, 1.29154360294342041, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91627, 15897, 0, 1, 1, 0, -4663.15966796875, -956.2352294921875, 500.460357666015625, 0.05235987901687622, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91628, 15892, 0, 1, 1, 0, -4663.470703125, -949.99383544921875, 500.46063232421875, 4.694935798645019531, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91629, 15892, 0, 1, 1, 0, -8873.0087890625, 650.2891845703125, 96.10797119140625, 4.97418832778930664, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91632, 15895, 0, 1, 1, 0, -8756.0517578125, 1068.7994384765625, 90.60748291015625, 5.532693862915039062, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91633, 15892, 0, 1, 1, 0, -8747.974609375, 1069.0621337890625, 90.21788787841796875, 1.605702877044677734, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91634, 15892, 0, 1, 1, 0, -4667.18310546875, -959.8221435546875, 500.459747314453125, 0.680678427219390869, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91635, 15897, 0, 1, 1, 0, -8748.478515625, 1074.2469482421875, 90.61944580078125, 0.471238881349563598, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91636, 15898, 0, 1, 1, 0, -4644.21337890625, -950.1368408203125, 501.743896484375, 0.959931075572967529, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91637, 15892, 0, 1, 1, 0, -8752.71484375, 1077.1827392578125, 90.8636016845703125, 5.654866695404052734, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91641, 15897, 1, 1, 1, 0, 7570.1494140625, -2220.806640625, 473.52069091796875, 3.857177734375, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91643, 15897, 1, 1, 1, 0, 7610.80322265625, -2228.959716796875, 468.761199951171875, 1.274090290069580078, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91645, 15897, 1, 1, 1, 0, 7575.24755859375, -2238.940185546875, 469.853302001953125, 1.029744267463684082, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91647, 15961, 1, 1, 1, 1, 7561.17822265625, -2206.26123046875, 475.037567138671875, 0.157079637050628662, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91649, 15897, 1, 1, 1, 0, 7603.54931640625, -2211.26171875, 471.74481201171875, 3.124139308929443359, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91650, 15897, 1, 1, 1, 0, 7585.1484375, -2205.240478515625, 475.369384765625, 0.959931075572967529, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91660, 15897, 1, 1, 1, 0, 7595.63623046875, -2247.21533203125, 466.956298828125, 4.328416347503662109, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91667, 15961, 1, 1, 1, 1, 7580.48291015625, -2249.02783203125, 467.078521728515625, 4.310963153839111328, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91677, 15898, 1, 1, 1, 0, 7597.22314453125, -2225.74462890625, 468.634613037109375, 5.619960308074951171, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91678, 15961, 1, 1, 1, 1, 7587.5, -2196.2822265625, 476.2769775390625, 1.570796370506286621, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91679, 15864, 1, 1, 1, 1, 7948.87841796875, -2619.704345703125, 492.719696044921875, 2.30383467674255371, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91680, 15961, 1, 1, 1, 1, 7605.21630859375, -2257.08544921875, 465.6455078125, 4.171336650848388671, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91681, 15961, 1, 1, 1, 1, 7586.5849609375, -2221.232666015625, 471.459930419921875, 5.515240192413330078, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91682, 15961, 1, 1, 1, 1, 7630.91748046875, -2227.68896484375, 465.58941650390625, 3.001966238021850585, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91683, 15961, 1, 1, 1, 1, 7949.61962890625, -2616.4951171875, 492.59423828125, 2.775073528289794921, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91684, 15961, 1, 1, 1, 1, 7558.421875, -2223.757080078125, 472.221954345703125, 0.331612557172775268, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91685, 15961, 1, 1, 1, 1, 7604.859375, -2204.06640625, 473.114013671875, 0.628318548202514648, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91686, 15961, 1, 1, 1, 1, 7946.9677734375, -2628.27099609375, 492.89556884765625, 3.089232683181762695, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91687, 15909, 1, 1, 1, 0, 7947.822265625, -2622.942138671875, 492.850921630859375, 2.809980154037475585, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91688, 15892, 1, 1, 1, 0, 9927.9873046875, 2492.17236328125, 1317.660888671875, 0.959931075572967529, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(91689, 15898, 1, 1, 1, 0, 7590.5615234375, -2219.204345703125, 470.211822509765625, 2.652900457382202148, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97677, 15892, 530, 1, 1, 0, -1781.74951171875, 5438.71533203125, -12.3448066711425781, 0.261799395084381103, 120, 0, 0, 0, 0, 0, "", 47966, 1, NULL),
|
||||
(97678, 15892, 530, 1, 1, 0, -1775.5633544921875, 5444.45458984375, -12.3448057174682617, 4.223696708679199218, 120, 0, 0, 0, 0, 0, "", 47966, 1, NULL),
|
||||
(97679, 15892, 530, 1, 1, 0, -1773.5477294921875, 5436.27978515625, -12.3448047637939453, 2.49582076072692871, 120, 0, 0, 0, 0, 0, "", 47966, 1, NULL),
|
||||
(97680, 15898, 530, 1, 1, 0, -1790.0748291015625, 5499.826171875, -12.3448076248168945, 0.698131680488586425, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97681, 15898, 530, 1, 1, 0, -1763.5718994140625, 5447.71728515625, -12.3448076248168945, 0.226892799139022827, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97682, 15898, 530, 1, 1, 0, 9490.6171875, -7290.2353515625, 14.39640998840332031, 0.698131680488586425, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97683, 15895, 530, 1, 1, 0, -1794.924072265625, 5506.38818359375, -12.3448057174682617, 0.680678427219390869, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97684, 15895, 530, 1, 1, 0, -1762.1146240234375, 5439.025390625, -12.3448085784912109, 0.331612557172775268, 120, 0, 0, 0, 0, 0, "", 47966, 1, NULL),
|
||||
(97685, 15895, 530, 1, 1, 0, 9487.328125, -7285.73681640625, 14.37371158599853515, 0.680678427219390869, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97686, 15891, 530, 1, 1, 0, -1799.07861328125, 5491.60302734375, -12.3448076248168945, 2.879793167114257812, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97687, 15891, 530, 1, 1, 0, -1804.24072265625, 5498.24755859375, -12.3448085784912109, 4.694935798645019531, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97688, 15891, 530, 1, 1, 0, -1807.635986328125, 5489.9736328125, -12.3448076248168945, 0.750491559505462646, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97689, 15891, 530, 1, 1, 0, 9483.5791015625, -7296.71435546875, 14.430816650390625, 2.879793167114257812, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97690, 15891, 530, 1, 1, 0, 9479.115234375, -7290.20947265625, 14.36028671264648437, 4.694935798645019531, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97691, 15891, 530, 1, 1, 0, 9475.6806640625, -7297.98779296875, 14.43598270416259765, 0.750491559505462646, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(97692, 15897, 530, 1, 1, 0, -1804.3443603515625, 5492.79443359375, -12.3448085784912109, 5.375614166259765625, 120, 0, 0, 0, 0, 0, "", 52237, 1, NULL),
|
||||
(97693, 15897, 530, 1, 1, 0, -1778.0633544921875, 5439.6865234375, -12.3448076248168945, 4.415682792663574218, 120, 0, 0, 0, 0, 0, "", 47966, 1, NULL),
|
||||
(97694, 15897, 530, 1, 1, 0, 9479.2578125, -7295.2119140625, 14.40949821472167968, 4.398229598999023437, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL);
|
||||
|
||||
DELETE FROM `game_event_creature` WHERE (`eventEntry` = 7)
|
||||
AND (`guid` IN (61988, 61989, 61990, 61991, 61992, 61993, 85532, 85533, 85534, 85535, 85536, 85537, 85538, 85539, 85540, 85541, 85542, 85543, 91572, 91593, 91594, 91595, 91596, 91597, 91599, 91600, 91601, 91602, 91604, 91605, 91606, 91607, 91608, 91609, 91611, 91612, 91613, 91614, 91615, 91622, 91623, 91624, 91625, 91626, 91627, 91628, 91629, 91632, 91633, 91634, 91635, 91636, 91637, 91641, 91643, 91645, 91647, 91649, 91650, 91660, 91667, 91677, 91678, 91679, 91680, 91681, 91682, 91683, 91684, 91685, 91686, 91687, 91688, 91689, 97677, 97678, 97679, 97680, 97681, 97682, 97683, 97684, 97685, 97686, 97687, 97688, 97689, 97690, 97691, 97692, 97693, 97694));
|
||||
INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES
|
||||
(7, 61988),
|
||||
(7, 61989),
|
||||
(7, 61990),
|
||||
(7, 61991),
|
||||
(7, 61992),
|
||||
(7, 61993),
|
||||
(7, 85532),
|
||||
(7, 85533),
|
||||
(7, 85534),
|
||||
(7, 85535),
|
||||
(7, 85536),
|
||||
(7, 85537),
|
||||
(7, 85538),
|
||||
(7, 85539),
|
||||
(7, 85540),
|
||||
(7, 85541),
|
||||
(7, 85542),
|
||||
(7, 85543),
|
||||
(7, 91572),
|
||||
(7, 91593),
|
||||
(7, 91594),
|
||||
(7, 91595),
|
||||
(7, 91596),
|
||||
(7, 91597),
|
||||
(7, 91599),
|
||||
(7, 91600),
|
||||
(7, 91601),
|
||||
(7, 91602),
|
||||
(7, 91604),
|
||||
(7, 91605),
|
||||
(7, 91606),
|
||||
(7, 91607),
|
||||
(7, 91608),
|
||||
(7, 91609),
|
||||
(7, 91611),
|
||||
(7, 91612),
|
||||
(7, 91613),
|
||||
(7, 91614),
|
||||
(7, 91615),
|
||||
(7, 91622),
|
||||
(7, 91623),
|
||||
(7, 91624),
|
||||
(7, 91625),
|
||||
(7, 91626),
|
||||
(7, 91627),
|
||||
(7, 91628),
|
||||
(7, 91629),
|
||||
(7, 91632),
|
||||
(7, 91633),
|
||||
(7, 91634),
|
||||
(7, 91635),
|
||||
(7, 91636),
|
||||
(7, 91637),
|
||||
(7, 91641),
|
||||
(7, 91643),
|
||||
(7, 91645),
|
||||
(7, 91647),
|
||||
(7, 91649),
|
||||
(7, 91650),
|
||||
(7, 91660),
|
||||
(7, 91667),
|
||||
(7, 91677),
|
||||
(7, 91678),
|
||||
(7, 91679),
|
||||
(7, 91680),
|
||||
(7, 91681),
|
||||
(7, 91682),
|
||||
(7, 91683),
|
||||
(7, 91684),
|
||||
(7, 91685),
|
||||
(7, 91686),
|
||||
(7, 91687),
|
||||
(7, 91688),
|
||||
(7, 91689),
|
||||
(7, 97677),
|
||||
(7, 97678),
|
||||
(7, 97679),
|
||||
(7, 97680),
|
||||
(7, 97681),
|
||||
(7, 97682),
|
||||
(7, 97683),
|
||||
(7, 97684),
|
||||
(7, 97685),
|
||||
(7, 97686),
|
||||
(7, 97687),
|
||||
(7, 97688),
|
||||
(7, 97689),
|
||||
(7, 97690),
|
||||
(7, 97691),
|
||||
(7, 97692),
|
||||
(7, 97693),
|
||||
(7, 97694);
|
||||
|
||||
-- new spawns
|
||||
DELETE FROM `creature` WHERE (`id1` IN (15897, 15961))
|
||||
AND (`guid` IN (12711, 12712, 12713));
|
||||
INSERT INTO `creature` (`guid`, `id1`, `map`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`, `CreateObject`, `Comment`) VALUES
|
||||
(12711, 15897, 571, 1, 1, 0, 8496.1904296875, 1103.471923828125, 554.46051025390625, 0, 120, 0, 0, 0, 0, 0, "", 50172, 1, NULL),
|
||||
(12712, 15961, 1, 1, 1, 1, 7924.0859375, -2637.7294921875, 492.761199951171875, 0.471238881349563598, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL),
|
||||
(12713, 15961, 1, 1, 1, 1, 7929.99072265625, -2605.031005859375, 492.775634765625, 5.532693862915039062, 120, 0, 0, 0, 0, 0, "", 47720, 1, NULL);
|
||||
|
||||
DELETE FROM `game_event_creature` WHERE (`eventEntry` = 7)
|
||||
AND (`guid` IN (12711, 12712, 12713));
|
||||
INSERT INTO `game_event_creature` (`eventEntry`,`guid`) VALUES
|
||||
-- unrelated to the game event
|
||||
-- (7, 12711),
|
||||
(7, 12712),
|
||||
(7, 12713);
|
||||
7
data/sql/updates/db_world/2024_11_16_03.sql
Normal file
7
data/sql/updates/db_world/2024_11_16_03.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2024_11_16_02 -> 2024_11_16_03
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23598;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23598) AND (`source_type` = 0) AND (`id` IN (0));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(23598, 0, 0, 0, 0, 0, 100, 0, 7000, 10000, 7000, 10000, 0, 0, 11, 43299, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Amani Dragonhawk Hatchling - In Combat - Cast \'Flame Buffet\'');
|
||||
4
data/sql/updates/db_world/2024_11_16_04.sql
Normal file
4
data/sql/updates/db_world/2024_11_16_04.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_16_03 -> 2024_11_16_04
|
||||
--
|
||||
UPDATE `creature` SET `position_z` = 31.0639 WHERE `guid` = 7887;
|
||||
UPDATE `creature` SET `position_z` = 52.9613 WHERE `guid` = 18622;
|
||||
4
data/sql/updates/db_world/2024_11_17_00.sql
Normal file
4
data/sql/updates/db_world/2024_11_17_00.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_16_04 -> 2024_11_17_00
|
||||
--
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE `id` = 1204;
|
||||
|
||||
5
data/sql/updates/db_world/2024_11_17_01.sql
Normal file
5
data/sql/updates/db_world/2024_11_17_01.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- DB update 2024_11_17_00 -> 2024_11_17_01
|
||||
|
||||
UPDATE `creature` SET `position_z` = -0.2568386 WHERE `guid` = 35230;
|
||||
UPDATE `creature` SET `position_z` = -0.6963177 WHERE `guid` = 35252;
|
||||
UPDATE `creature` SET `position_z` = -1.5501903 WHERE `guid` = 35253;
|
||||
3
data/sql/updates/db_world/2024_11_17_02.sql
Normal file
3
data/sql/updates/db_world/2024_11_17_02.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_17_01 -> 2024_11_17_02
|
||||
--
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra`| 256 WHERE `entry` IN (23574, 23863);
|
||||
7
data/sql/updates/db_world/2024_11_18_00.sql
Normal file
7
data/sql/updates/db_world/2024_11_18_00.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2024_11_17_02 -> 2024_11_18_00
|
||||
--
|
||||
-- Issue: 20606 (Vital Supplies)
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 1395);
|
||||
|
||||
-- Issue: 20607 (Report to Mountaineer Rockgar)
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 455);
|
||||
47
data/sql/updates/db_world/2024_11_18_01.sql
Normal file
47
data/sql/updates/db_world/2024_11_18_01.sql
Normal file
@@ -0,0 +1,47 @@
|
||||
-- DB update 2024_11_18_00 -> 2024_11_18_01
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (-45537,-45570,-45571,-48394,-48400,-54994,-54996,-54999,-55062,-55064,-55065);
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 25507);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(25507, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 18950, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Invisibility and Stealth Detection'),
|
||||
(25507, 0, 1, 0, 0, 0, 100, 0, 5800, 6800, 10400, 11400, 0, 0, 11, 46480, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Fel Lightning'),
|
||||
(25507, 0, 2, 0, 25, 0, 100, 769, 0, 0, 0, 0, 0, 0, 11, 59123, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Reset - Cast Banish'),
|
||||
(25507, 0, 3, 0, 101, 0, 100, 0, 1, 10, 30000, 2000, 2000, 0, 28, 59123, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On 1 or More Players in Range - Remove Aura \'Cosmetic - Stun + Immune Permanent (Freeze Anim)\''),
|
||||
(25507, 0, 4, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 28, 59123, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Aggro - Remove Aura \'Cosmetic - Stun + Immune Permanent (Freeze Anim)\''),
|
||||
(25507, 0, 5, 6, 8, 0, 100, 512, 46476, 0, 0, 0, 0, 0, 28, 59123, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Spellhit \'Sunblade Protector Activated\' - Remove Aura \'Cosmetic - Stun + Immune Permanent (Freeze Anim)\''),
|
||||
(25507, 0, 6, 8, 61, 0, 100, 512, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Spellhit \'Sunblade Protector Activated\' - Set In Combat With Zone'),
|
||||
(25507, 0, 7, 10, 21, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Reached Home - Say Line 3'),
|
||||
(25507, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Spellhit \'Sunblade Protector Activated\' - Say Line 1'),
|
||||
(25507, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Spellhit \'Sunblade Protector Activated\' - Say Line 2'),
|
||||
(25507, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 59123, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Reached Home - Cast \'Cosmetic - Stun + Immune Permanent (Freeze Anim)\'');
|
||||
|
||||
SET @GUID := 48394;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -@GUID);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(-@GUID, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 18950, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Invisibility and Stealth Detection'),
|
||||
(-@GUID, 0, 1, 0, 0, 0, 100, 0, 5800, 6800, 10400, 11400, 0, 0, 11, 46480, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Fel Lightning'),
|
||||
(-@GUID, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Aggro - Say Line 0');
|
||||
|
||||
SET @GUID := 48400;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -@GUID);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(-@GUID, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 18950, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Invisibility and Stealth Detection'),
|
||||
(-@GUID, 0, 1, 0, 0, 0, 100, 0, 5800, 6800, 10400, 11400, 0, 0, 11, 46480, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Fel Lightning'),
|
||||
(-@GUID, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Aggro - Say Line 0');
|
||||
|
||||
SET @GUID := 54999;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = -@GUID);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(-@GUID, 0, 0, 0, 11, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 18950, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Invisibility and Stealth Detection'),
|
||||
(-@GUID, 0, 1, 0, 0, 0, 100, 0, 5800, 6800, 10400, 11400, 0, 0, 11, 46480, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - In Combat - Cast Fel Lightning'),
|
||||
(-@GUID, 0, 2, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Sunblade Protector - On Aggro - Say Line 0');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 25507;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `Comment`) VALUES
|
||||
(25507, 0, 0, 'Enemy presence detected.', 14, 0, 100, 0, 0, 0, 25203, 0, 'Sunblade Protector - On Aggro'),
|
||||
(25507, 1, 0, 'Local proximity threat detected. Exiting energy conservation mode.', 14, 0, 100, 0, 0, 0, 25201, 0, 'Sunblade Protector - Activated'),
|
||||
(25507, 2, 0, 'Unit is now operational and attacking targets.', 14, 0, 100, 0, 0, 0, 25206, 0, 'Sunblade Protector - Activated'),
|
||||
(25507, 3, 0, 'Unit entering energy conservation mode.', 14, 0, 100, 0, 0, 0, 25200, 0, 'Sunblade Protector - Just Reached Home');
|
||||
6
data/sql/updates/db_world/2024_11_19_00.sql
Normal file
6
data/sql/updates/db_world/2024_11_19_00.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- DB update 2024_11_18_01 -> 2024_11_19_00
|
||||
--
|
||||
UPDATE `creature` SET `position_z` = 36.6058 WHERE `guid` = 25154;
|
||||
UPDATE `creature` SET `position_z` = 49.7443 WHERE `guid` = 25156;
|
||||
UPDATE `creature` SET `position_z` = 47.7498 WHERE `guid` = 30491;
|
||||
UPDATE `creature` SET `position_z` = 42.3045 WHERE `guid` = 30533;
|
||||
16
data/sql/updates/db_world/2024_11_19_01.sql
Normal file
16
data/sql/updates/db_world/2024_11_19_01.sql
Normal file
@@ -0,0 +1,16 @@
|
||||
-- DB update 2024_11_19_00 -> 2024_11_19_01
|
||||
DELETE FROM `conditions` WHERE
|
||||
`SourceTypeOrReferenceId` = 23 AND
|
||||
`SourceGroup` = 14522 AND
|
||||
`SourceEntry` = 18687 AND
|
||||
`ConditionTypeOrReference` = 9 AND
|
||||
`ConditionValue1` = 7625;
|
||||
|
||||
INSERT INTO `conditions` (
|
||||
`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`,
|
||||
`ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`,
|
||||
`ConditionValue1`, `ConditionValue2`, `ConditionValue3`,
|
||||
`NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`
|
||||
)
|
||||
VALUES
|
||||
(23, 14522, 18687, 0, 0, 9, 0, 7625, 0, 0, 0, 0, 0, '', 'Vendor: Require quest 7625 accepted to buy Xorothian Stardust');
|
||||
4
data/sql/updates/db_world/2024_11_19_02.sql
Normal file
4
data/sql/updates/db_world/2024_11_19_02.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_19_01 -> 2024_11_19_02
|
||||
-- Multiphase Goggles
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=46273 AND `ScriptName`='spell_item_multiphase_goggles';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (46273, 'spell_item_multiphase_goggles');
|
||||
4
data/sql/updates/db_world/2024_11_19_03.sql
Normal file
4
data/sql/updates/db_world/2024_11_19_03.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_19_02 -> 2024_11_19_03
|
||||
|
||||
DELETE FROM `linked_respawn` WHERE `guid` IN (89266, 89267, 89272, 89275);
|
||||
DELETE FROM `creature` WHERE `id1` = 24217;
|
||||
7
data/sql/updates/db_world/2024_11_20_00.sql
Normal file
7
data/sql/updates/db_world/2024_11_20_00.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2024_11_19_03 -> 2024_11_20_00
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 17 AND `SourceEntry` = 44969;
|
||||
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`)
|
||||
VALUES
|
||||
(17, 0, 44969, 0, 0, 29, 0, 24980, 15, 0, 0, 0, 0, '', 'Must be near Crystal Ward');
|
||||
|
||||
7
data/sql/updates/db_world/2024_11_20_01.sql
Normal file
7
data/sql/updates/db_world/2024_11_20_01.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2024_11_20_00 -> 2024_11_20_01
|
||||
--
|
||||
-- SMART_EVENT_IS_IN_MELEE_RANGE invert, SMARTCAST_TRIGGERED, TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
|
||||
UPDATE `smart_scripts` SET `event_type` = 110, `event_param1` = 0, `event_param3` = 3000, `event_param4` = 3500, `event_param6` = 1, `action_param2` = (`action_param2` | 0x2 | 0x40), `action_param3` = (`action_param3` | 0x4), `comment` = 'Irespeaker - On Not In Melee Range - Cast \'Fel Fireball\'' WHERE (`entryorguid` = 24999) AND (`source_type` = 0) AND (`id` = 0);
|
||||
|
||||
-- SMART_EVENT_IS_IN_MELEE_RANGE, SMARTCAST_TRIGGERED TRIGGERED_IGNORE_POWER_AND_REAGENT_COST
|
||||
UPDATE `smart_scripts` SET `event_type` = 110, `action_param2` = (`action_param2` | 0x2), `action_param3` = (`action_param3` | 0x4), `comment` = 'Irespeaker - On In Melee Range - Cast \'Fel Consumption\'' WHERE (`entryorguid` = 24999) AND (`source_type` = 0) AND (`id` = 1);
|
||||
76
data/sql/updates/db_world/2024_11_20_02.sql
Normal file
76
data/sql/updates/db_world/2024_11_20_02.sql
Normal file
@@ -0,0 +1,76 @@
|
||||
-- DB update 2024_11_20_01 -> 2024_11_20_02
|
||||
-- Deer (883)
|
||||
UPDATE `creature_template` SET `skinloot` = 883 WHERE (`entry` = 883);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 883);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(883, 2318, 0, 9.92, 0, 1, 0, 1, 1, 'Deer - Light Leather'),
|
||||
(883, 2934, 0, 90.08, 0, 1, 0, 1, 1, 'Deer - Ruined Leather Scraps');
|
||||
|
||||
-- Fawn (890)
|
||||
UPDATE `creature_template` SET `skinloot` = 890 WHERE (`entry` = 890);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 890);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(890, 2318, 0, 11.1, 0, 1, 0, 1, 1, 'Fawn - Light Leather'),
|
||||
(890, 2934, 0, 88.9, 0, 1, 0, 1, 1, 'Fawn - Ruined Leather Scraps');
|
||||
|
||||
-- Pyrewood Leatherworker (3532)
|
||||
UPDATE `creature_template` SET `skinloot` = 3532 WHERE (`entry` = 3532);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 3532);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(3532, 783, 0, 6.67, 0, 1, 0, 1, 1, 'Pyrewood Leatherworker - Light Hide'),
|
||||
(3532, 2318, 0, 93.33, 0, 1, 0, 1, 1, 'Pyrewood Leatherworker - Light Leather');
|
||||
|
||||
-- Ram (2098)
|
||||
UPDATE `creature_template` SET `skinloot` = 2098 WHERE (`entry` = 2098);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 2098);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(2098, 2318, 0, 7.84, 0, 1, 0, 1, 1, 'Ram - Light Leather'),
|
||||
(2098, 2934, 0, 92.16, 0, 1, 0, 1, 1, 'Ram - Ruined Leather Scraps');
|
||||
|
||||
-- Prairie Dog (2620)
|
||||
UPDATE `creature_template` SET `skinloot` = 2620 WHERE (`entry` = 2620);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 2620);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(2620, 2318, 0, 6.06, 0, 1, 0, 1, 1, 'Prairie Dog - Light Leather'),
|
||||
(2620, 2934, 0, 93.94, 0, 1, 0, 1, 1, 'Prairie Dog - Ruined Leather Scraps');
|
||||
|
||||
-- Pyrewood Sentry (1894)
|
||||
UPDATE `creature_template` SET `skinloot` = 1894 WHERE (`entry` = 1894);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1894);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1894, 783, 0, 6.1, 0, 1, 0, 1, 1, 'Pyrewood Sentry - Light Hide'),
|
||||
(1894, 2318, 0, 55.69, 0, 1, 0, 1, 1, 'Pyrewood Sentry - Light Leather'),
|
||||
(1894, 2934, 0, 38.21, 0, 1, 0, 1, 1, 'Pyrewood Sentry - Ruined Leather Scraps');
|
||||
|
||||
-- Sheep (1933)
|
||||
UPDATE `creature_template` SET `skinloot` = 1933 WHERE (`entry` = 1933);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1933);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1933, 2318, 0, 9.0, 0, 1, 0, 1, 1, 'Sheep - Light Leather'),
|
||||
(1933, 2592, 0, 22.89, 0, 1, 0, 1, 1, 'Sheep - Wool Cloth'),
|
||||
(1933, 2934, 0, 61.45, 0, 1, 0, 1, 1, 'Sheep - Ruined Leather Scraps');
|
||||
|
||||
-- Gazelle (4166)
|
||||
UPDATE `creature_template` SET `skinloot` = 4166 WHERE (`entry` = 4166);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 4166);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(4166, 2318, 0, 10.19, 0, 1, 0, 1, 1, 'Gazelle - Light Leather'),
|
||||
(4166, 2934, 0, 89.81, 0, 1, 0, 1, 2, 'Gazelle - Ruined Leather Scraps');
|
||||
|
||||
-- Vagash (1388)
|
||||
UPDATE `creature_template` SET `skinloot` = 1388 WHERE (`entry` = 1388);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1388);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1388, 783, 0, 4.76, 0, 1, 0, 1, 1, 'Vagash - Light Hide'),
|
||||
(1388, 2318, 0, 60.32, 0, 1, 0, 1, 2, 'Vagash - Light Leather'),
|
||||
(1388, 2934, 0, 34.92, 0, 1, 0, 1, 1, 'Vagash - Ruined Leather Scraps');
|
||||
|
||||
-- Stormwind Royal Guard (1756)
|
||||
UPDATE `creature_template` SET `skinloot` = 1756 WHERE (`entry` = 1756);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1756);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1756, 4304, 0, 4.51, 0, 1, 0, 1, 2, 'Stormwind Royal Guard - Thick Leather'),
|
||||
(1756, 8165, 0, 11.41, 0, 1, 0, 1, 1, 'Stormwind Royal Guard - Worn Dragonscale'),
|
||||
(1756, 8170, 0, 54.77, 0, 1, 0, 1, 2, 'Stormwind Royal Guard - Rugged Leather'),
|
||||
(1756, 8171, 0, 5.44, 0, 1, 0, 1, 1, 'Stormwind Royal Guard - Rugged Hide'),
|
||||
(1756, 15416, 0, 23.87, 0, 1, 0, 1, 1, 'Stormwind Royal Guard - Black Dragonscale');
|
||||
77
data/sql/updates/db_world/2024_11_20_03.sql
Normal file
77
data/sql/updates/db_world/2024_11_20_03.sql
Normal file
@@ -0,0 +1,77 @@
|
||||
-- DB update 2024_11_20_02 -> 2024_11_20_03
|
||||
-- Rabbit (721)
|
||||
UPDATE `creature_template` SET `skinloot` = 721 WHERE (`entry` = 721);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 721);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(721, 2318, 0, 10.53, 0, 1, 0, 1, 1, 'Rabbit - Light Leather'),
|
||||
(721, 2934, 0, 89.47, 0, 1, 0, 1, 1, 'Rabbit - Ruined Leather Scraps');
|
||||
|
||||
-- Nefaru (534)
|
||||
UPDATE `creature_template` SET `skinloot` = 534 WHERE (`entry` = 534);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 534);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(534, 2319, 0, 40.86, 0, 1, 0, 1, 1, 'Nefaru - Medium Leather'),
|
||||
(534, 4232, 0, 2.15, 0, 1, 0, 1, 1, 'Nefaru - Medium Hide'),
|
||||
(534, 4234, 0, 52.69, 0, 1, 0, 1, 1, 'Nefaru - Heavy Leather'),
|
||||
(534, 4235, 0, 4.3, 0, 1, 0, 1, 1, 'Nefaru - Heavy Hide');
|
||||
|
||||
-- Pyrewood Tailor (3530)
|
||||
UPDATE `creature_template` SET `skinloot` = 3530 WHERE (`entry` = 3530);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 3530);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(3530, 783, 0, 4.55, 0, 1, 0, 1, 1, 'Pyrewood Tailor - Light Hide'),
|
||||
(3530, 2318, 0, 86.36, 0, 1, 0, 1, 1, 'Pyrewood Tailor - Light Leather'),
|
||||
(3530, 2934, 0, 9.09, 0, 1, 0, 1, 1, 'Pyrewood Tailor - Ruined Leather Scraps');
|
||||
|
||||
-- Cow (2442)
|
||||
UPDATE `creature_template` SET `skinloot` = 2442 WHERE (`entry` = 2442);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 2442);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(2442, 2318, 0, 10.72, 0, 1, 0, 1, 1, 'Cow - Light Leather'),
|
||||
(2442, 2934, 0, 89.29, 0, 1, 0, 1, 1, 'Cow - Ruined Leather Scraps');
|
||||
|
||||
-- Pyrewood Watcher (1891)
|
||||
UPDATE `creature_template` SET `skinloot` = 1891 WHERE (`entry` = 1891);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1891);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1891, 783, 0, 3.16, 0, 1, 0, 1, 1, 'Pyrewood Watcher - Light Hide'),
|
||||
(1891, 2318, 0, 63.16, 0, 1, 0, 1, 1, 'Pyrewood Watcher - Light Leather'),
|
||||
(1891, 2934, 0, 33.68, 0, 1, 0, 1, 1, 'Pyrewood Watcher - Ruined Leather Scraps');
|
||||
|
||||
-- Infected Deer (10780)
|
||||
UPDATE `creature_template` SET `skinloot` = 10780 WHERE (`entry` = 10780);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 10780);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(10780, 2318, 0, 10.1, 0, 1, 0, 1, 1, 'Infected Deer - Light Leather'),
|
||||
(10780, 2934, 0, 89.9, 0, 1, 0, 1, 1, 'Infected Deer - Ruined Leather Scraps');
|
||||
|
||||
-- Pyrewood Elder (1895)
|
||||
UPDATE `creature_template` SET `skinloot` = 1895 WHERE (`entry` = 1895);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 1895);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(1895, 783, 0, 5.51, 0, 1, 0, 1, 1, 'Pyrewood Elder - Light Hide'),
|
||||
(1895, 2318, 0, 63.78, 0, 1, 0, 1, 1, 'Pyrewood Elder - Light Leather'),
|
||||
(1895, 2934, 0, 30.71, 0, 1, 0, 1, 1, 'Pyrewood Elder - Ruined Leather Scraps');
|
||||
|
||||
-- Sickly Deer (12298)
|
||||
UPDATE `creature_template` SET `skinloot` = 12298 WHERE (`entry` = 12298);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 12298);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(12298, 2318, 0, 10.06, 0, 1, 0, 1, 1, 'Sickly Deer - Light Leather'),
|
||||
(12298, 2934, 0, 89.94, 0, 1, 0, 1, 1, 'Sickly Deer - Ruined Leather Scraps');
|
||||
|
||||
-- Hare (5951)
|
||||
UPDATE `creature_template` SET `skinloot` = 5951 WHERE (`entry` = 5951);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 5951);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(5951, 2318, 0, 9.13, 0, 1, 0, 1, 1, 'Hare - Light Leather'),
|
||||
(5951, 2934, 0, 90.87, 0, 1, 0, 1, 1, 'Hare - Ruined Leather Scraps');
|
||||
|
||||
-- Hakkari Minion (8437)
|
||||
UPDATE `creature_template` SET `skinloot` = 8437 WHERE (`entry` = 8437);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 8437);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(8437, 4234, 0, 43.94, 0, 1, 0, 1, 1, 'Hakkari Minion - Heavy Leather'),
|
||||
(8437, 4235, 0, 3.46, 0, 1, 0, 1, 1, 'Hakkari Minion - Heavy Hide'),
|
||||
(8437, 4304, 0, 48.44, 0, 1, 0, 1, 1, 'Hakkari Minion - Thick Leather'),
|
||||
(8437, 8169, 0, 4.15, 0, 1, 0, 1, 1, 'Hakkari Minion - Thick Hide');
|
||||
74
data/sql/updates/db_world/2024_11_20_04.sql
Normal file
74
data/sql/updates/db_world/2024_11_20_04.sql
Normal file
@@ -0,0 +1,74 @@
|
||||
-- DB update 2024_11_20_03 -> 2024_11_20_04
|
||||
-- Sorrow Wing (5928)
|
||||
UPDATE `creature_template` SET `skinloot` = 5928 WHERE (`entry` = 5928);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 5928);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(5928, 2319, 0, 67.12, 0, 1, 0, 1, 2, 'Sorrow Wing - Medium Leather'),
|
||||
(5928, 4232, 0, 8.22, 0, 1, 0, 1, 1, 'Sorrow Wing - Medium Hide'),
|
||||
(5928, 4234, 0, 23.29, 0, 1, 0, 1, 2, 'Sorrow Wing - Heavy Leather'),
|
||||
(5928, 4235, 0, 1.37, 0, 1, 0, 1, 1, 'Sorrow Wing - Heavy Hide');
|
||||
|
||||
-- Sickly Gazelle (12296)
|
||||
UPDATE `creature_template` SET `skinloot` = 12296 WHERE (`entry` = 12296);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 12296);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(12296, 2318, 0, 9.74, 0, 1, 0, 1, 1, 'Sickly Gazelle - Light Leather'),
|
||||
(12296, 2934, 0, 90.28, 0, 1, 0, 1, 1, 'Sickly Gazelle - Ruined Leather Scraps');
|
||||
|
||||
-- Brokentoe (18398)
|
||||
UPDATE `creature_template` SET `skinloot` = 18398 WHERE (`entry` = 18398);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 18398);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(18398, 21887, 0, 25.97, 0, 1, 0, 1, 1, 'Brokentoe - Knothide Leather'),
|
||||
(18398, 25649, 0, 40.26, 0, 1, 0, 2, 3, 'Brokentoe - Knothide Leather Scraps'),
|
||||
(18398, 25708, 0, 33.77, 0, 1, 0, 1, 1, 'Brokentoe - Thick Clefthoof Leather');
|
||||
|
||||
-- Skunk (17467)
|
||||
UPDATE `creature_template` SET `skinloot` = 17467 WHERE (`entry` = 17467);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 17467);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(17467, 2318, 0, 5.56, 0, 1, 0, 1, 1, 'Skunk - Light Leather'),
|
||||
(17467, 2934, 0, 94.44, 0, 1, 0, 1, 1, 'Skunk - Ruined Leather Scraps');
|
||||
|
||||
-- Ethereum Prisoner (20520)
|
||||
UPDATE `creature_template` SET `skinloot` = 20520 WHERE (`entry` = 20520);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 20520);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(20520, 21887, 0, 24.65, 0, 1, 0, 1, 1, 'Ethereum Prisoner - Knothide Leather'),
|
||||
(20520, 25649, 0, 30.63, 0, 1, 0, 2, 3, 'Ethereum Prisoner - Knothide Leather Scraps'),
|
||||
(20520, 25699, 0, 22.54, 0, 1, 0, 1, 1, 'Ethereum Prisoner - Crystal Infused Leather'),
|
||||
(20520, 25700, 0, 22.18, 0, 1, 0, 1, 1, 'Ethereum Prisoner - Fel Scales');
|
||||
|
||||
-- Tarren Mill Protector (18093)
|
||||
UPDATE `creature_template` SET `skinloot` = 18093 WHERE (`entry` = 18093);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 18093);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(18093, 21887, 0, 78.83, 0, 1, 0, 1, 1, 'Tarren Mill Protector - Knothide Leather'),
|
||||
(18093, 25649, 0, 21.17, 0, 1, 0, 2, 3, 'Tarren Mill Protector - Knothide Leather Scraps');
|
||||
|
||||
-- Deathclaw (17661)
|
||||
UPDATE `creature_template` SET `skinloot` = 17661 WHERE (`entry` = 17661);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 17661);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(17661, 783, 0, 1.18, 0, 1, 0, 1, 1, 'Deathclaw - Light Hide'),
|
||||
(17661, 2318, 0, 78.82, 0, 1, 0, 1, 2, 'Deathclaw - Light Leather'),
|
||||
(17661, 2319, 0, 20.0, 0, 1, 0, 1, 1, 'Deathclaw - Medium Leather');
|
||||
|
||||
-- Infinite Chrono-Lord (21697)
|
||||
UPDATE `creature_template` SET `skinloot` = 21697 WHERE (`entry` = 21697);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 21697);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(21697, 21887, 0, 100.0, 0, 1, 0, 2, 4, 'Infinite Chrono-Lord - Knothide Leather');
|
||||
|
||||
-- Tarren Mill Guardsman (18092)
|
||||
UPDATE `creature_template` SET `skinloot` = 18092 WHERE (`entry` = 18092);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 18092);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(18092, 21887, 0, 80.0, 0, 1, 0, 1, 1, 'Tarren Mill Guardsman - Knothide Leather'),
|
||||
(18092, 25649, 0, 20.0, 0, 1, 0, 2, 3, 'Tarren Mill Guardsman - Knothide Leather Scraps');
|
||||
|
||||
-- Vazruden the Herald (17307)
|
||||
UPDATE `creature_template` SET `skinloot` = 17307 WHERE (`entry` = 17307);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 17307);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(17307, 21887, 0, 100.0, 0, 1, 0, 1, 4, 'Vazruden the Herald - Knothide Leather');
|
||||
82
data/sql/updates/db_world/2024_11_20_05.sql
Normal file
82
data/sql/updates/db_world/2024_11_20_05.sql
Normal file
@@ -0,0 +1,82 @@
|
||||
-- DB update 2024_11_20_04 -> 2024_11_20_05
|
||||
-- Markaru (20775)
|
||||
UPDATE `creature_template` SET `skinloot` = 20775 WHERE (`entry` = 20775);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 20775);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(20775, 21887, 0, 79.17, 0, 1, 0, 1, 1, 'Markaru - Knothide Leather'),
|
||||
(20775, 25649, 0, 20.83, 0, 1, 0, 2, 3, 'Markaru - Knothide Leather Scraps');
|
||||
|
||||
-- Shadowsworn Drakonid (22072)
|
||||
UPDATE `creature_template` SET `skinloot` = 22072 WHERE (`entry` = 22072);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 22072);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(22072, 21887, 0, 91.3, 0, 1, 0, 1, 1, 'Shadowsworn Drakonid - Knothide Leather'),
|
||||
(22072, 25649, 0, 8.7, 0, 1, 0, 2, 2, 'Shadowsworn Drakonid - Knothide Leather Scraps'),
|
||||
(22072, 35229, 0, 4.35, 0, 1, 0, 1, 1, 'Shadowsworn Drakonid - Nether Residue');
|
||||
|
||||
-- Dragon Turtle (22885)
|
||||
UPDATE `creature_template` SET `skinloot` = 22885 WHERE (`entry` = 22885);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 22885);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(22885, 21887, 0, 100.0, 0, 1, 0, 2, 4, 'Dragon Turtle - Knothide Leather');
|
||||
|
||||
-- Wyrmcult Blackwhelp (21387)
|
||||
UPDATE `creature_template` SET `skinloot` = 21387 WHERE (`entry` = 21387);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 21387);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(21387, 21887, 0, 81.61, 0, 1, 0, 1, 1, 'Wyrmcult Blackwhelp - Knothide Leather'),
|
||||
(21387, 25649, 0, 18.39, 0, 1, 0, 2, 3, 'Wyrmcult Blackwhelp - Knothide Leather Scraps');
|
||||
|
||||
-- Goreclaw the Ravenous (23873)
|
||||
UPDATE `creature_template` SET `skinloot` = 23873 WHERE (`entry` = 23873);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 23873);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(23873, 4234, 0, 75.22, 0, 1, 0, 1, 1, 'Goreclaw the Ravenous - Heavy Leather'),
|
||||
(23873, 4235, 0, 4.37, 0, 1, 0, 1, 1, 'Goreclaw the Ravenous - Heavy Hide'),
|
||||
(23873, 4304, 0, 20.41, 0, 1, 0, 1, 1, 'Goreclaw the Ravenous - Thick Leather');
|
||||
|
||||
-- Cataclysm Hound (25599)
|
||||
UPDATE `creature_template` SET `skinloot` = 25599 WHERE (`entry` = 25599);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 25599);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(25599, 21887, 0, 32.76, 0, 1, 0, 1, 3, 'Cataclysm Hound - Knothide Leather'),
|
||||
(25599, 25649, 0, 48.28, 0, 1, 0, 3, 4, 'Cataclysm Hound - Knothide Leather Scraps'),
|
||||
(25599, 25707, 0, 18.97, 0, 1, 0, 1, 1, 'Cataclysm Hound - Fel Hide');
|
||||
|
||||
-- Gezzarak the Huntress (23163)
|
||||
UPDATE `creature_template` SET `skinloot` = 23163 WHERE (`entry` = 23163);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 23163);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(23163, 21887, 0, 44.71, 0, 1, 0, 1, 3, 'Gezzarak the Huntress - Knothide Leather'),
|
||||
(23163, 25649, 0, 38.82, 0, 1, 0, 3, 4, 'Gezzarak the Huntress - Knothide Leather Scraps'),
|
||||
(23163, 25707, 0, 16.47, 0, 1, 0, 1, 1, 'Gezzarak the Huntress - Fel Hide'),
|
||||
(23163, 35229, 0, 1.18, 0, 1, 0, 1, 1, 'Gezzarak the Huntress - Nether Residue');
|
||||
|
||||
-- Tarren Mill Lookout (18094)
|
||||
UPDATE `creature_template` SET `skinloot` = 18094 WHERE (`entry` = 18094);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 18094);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(18094, 21887, 0, 79.55, 0, 1, 0, 1, 1, 'Tarren Mill Lookout - Knothide Leather'),
|
||||
(18094, 25649, 0, 20.45, 0, 1, 0, 2, 3, 'Tarren Mill Lookout - Knothide Leather Scraps');
|
||||
|
||||
-- Nerub'ar Champion (37501)
|
||||
UPDATE `creature_template` SET `skinloot` = 37501 WHERE (`entry` = 37501);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 37501);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(37501, 33568, 0, 87.88, 0, 1, 0, 1, 3, 'Nerub\'ar Champion - Borean Leather'),
|
||||
(37501, 38558, 0, 12.12, 0, 1, 0, 1, 2, 'Nerub\'ar Champion - Nerubian Chitin');
|
||||
|
||||
-- Keristrasza (26723)
|
||||
UPDATE `creature_template` SET `skinloot` = 26723 WHERE (`entry` = 26723);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 26723);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(26723, 33568, 0, 75.12, 0, 1, 0, 1, 3, 'Keristrasza - Borean Leather'),
|
||||
(26723, 38557, 0, 24.16, 0, 1, 0, 1, 2, 'Keristrasza - Icy Dragonscale'),
|
||||
(26723, 44128, 0, 0.72, 0, 1, 0, 1, 1, 'Keristrasza - Arctic Fur');
|
||||
|
||||
-- Nerub'ar Webweaver (37502)
|
||||
UPDATE `creature_template` SET `skinloot` = 37502 WHERE (`entry` = 37502);
|
||||
DELETE FROM `skinning_loot_template` WHERE (`Entry` = 37502);
|
||||
INSERT INTO `skinning_loot_template` (`Entry`, `Item`, `Reference`, `Chance`, `QuestRequired`, `LootMode`, `GroupId`, `MinCount`, `MaxCount`, `Comment`) VALUES
|
||||
(37502, 33568, 0, 72.73, 0, 1, 0, 1, 3, 'Nerub\'ar Webweaver - Borean Leather'),
|
||||
(37502, 38558, 0, 27.27, 0, 1, 0, 1, 2, 'Nerub\'ar Webweaver - Nerubian Chitin');
|
||||
39
data/sql/updates/db_world/2024_11_20_06.sql
Normal file
39
data/sql/updates/db_world/2024_11_20_06.sql
Normal file
@@ -0,0 +1,39 @@
|
||||
-- DB update 2024_11_20_05 -> 2024_11_20_06
|
||||
--
|
||||
-- NPC_LYNX
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 24143) AND (`source_type` = 0) AND (`id` IN (4,5));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(24143, 0, 4, 0, 54, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 43615, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Spirit of the Lynx - On Just Summoned - Cast \'Halazzi Transform\''),
|
||||
(24143, 0, 5, 0, 0, 0, 100, 0, 2000, 5000, 0, 0, 0, 0, 11, 42466, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Spirit of the Lynx - In Combat - Cast \'Cosmetic - Zul`Aman Spirit Effect\'');
|
||||
|
||||
-- merge if lynx <20% hp
|
||||
UPDATE `smart_scripts` SET `event_param1` = 0, `comment` = 'Spirit of the Lynx - Between 0-20% Health - Do Action ID 0' WHERE (`entryorguid` = 24143) AND (`source_type` = 0) AND (`id` = 3);
|
||||
|
||||
-- 43615 Halazzi Transform
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 43615) AND (`ConditionTypeOrReference` = 31);
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 43615, 0, 0, 31, 0, 3, 23577, 0, 0, 0, 0, '', 'Target Halazzi');
|
||||
|
||||
-- server side SetHealth spells
|
||||
UPDATE `spell_dbc` SET `ImplicitTargetA_1`=1, `Effect_1`=77, `EffectBasePoints_1`=74, `EffectDieSides_1`=1, `Name_Lang_enUS`='SetHealth (75%)' WHERE `ID`=43536;
|
||||
UPDATE `spell_dbc` SET `ImplicitTargetA_1`=1, `Effect_1`=77, `EffectBasePoints_1`=49, `EffectDieSides_1`=1, `Name_Lang_enUS`='SetHealth (50%)' WHERE `ID`=43537;
|
||||
UPDATE `spell_dbc` SET `ImplicitTargetA_1`=1, `Effect_1`=77, `EffectBasePoints_1`=24, `EffectDieSides_1`=1, `Name_Lang_enUS`='SetHealth (25%)' WHERE `ID`=43538;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (43536, 43537, 43538) AND `ScriptName`='spell_gen_set_health';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(43536, 'spell_gen_set_health'),
|
||||
(43537, 'spell_gen_set_health'),
|
||||
(43538, 'spell_gen_set_health');
|
||||
|
||||
-- copy all the lynx text to human text
|
||||
DELETE FROM `creature_text` WHERE (`CreatureID` = 24144);
|
||||
INSERT INTO `creature_text` VALUES
|
||||
(24144, 0, 0, 'Get on ya knees and bow.... to da fang and claw!', 14, 0, 100, 0, 0, 12020, 23612, 0, 'Halazzi - SAY_AGGRO'),
|
||||
(24144, 1, 0, 'You can fight da power!', 14, 0, 100, 0, 0, 12026, 0, 0, 'Halazzi - SAY_KILL'),
|
||||
(24144, 1, 1, 'Ya all gonna fail!', 14, 0, 100, 0, 0, 12027, 23614, 0, 'Halazzi - SAY_KILL'),
|
||||
(24144, 2, 0, 'Me gonna carve ya now!', 14, 0, 100, 0, 0, 12023, 23615, 0, 'Halazzi - SAY_SABER'),
|
||||
(24144, 2, 1, 'You gonna leave in pieces!', 14, 0, 100, 0, 0, 12024, 23616, 0, 'Halazzi - SAY_SABER'),
|
||||
(24144, 3, 0, 'I fight wit untamed spirit....', 14, 0, 100, 0, 0, 12021, 0, 0, 'Halazzi - SAY_SPLIT'),
|
||||
(24144, 4, 0, 'Spirit, come back to me!', 14, 0, 100, 0, 0, 12022, 22964, 0, 'Halazzi - SAY_MERGE'),
|
||||
(24144, 5, 0, 'Chaga... chokajinn.', 14, 0, 100, 0, 0, 12028, 0, 0, 'Halazzi - SAY_DEATH');
|
||||
|
||||
3
data/sql/updates/db_world/2024_11_20_07.sql
Normal file
3
data/sql/updates/db_world/2024_11_20_07.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_20_06 -> 2024_11_20_07
|
||||
--
|
||||
UPDATE `creature_template` SET `flags_extra` = `flags_extra`| 256 WHERE `entry` = 23578;
|
||||
10
data/sql/updates/db_world/2024_11_21_00.sql
Normal file
10
data/sql/updates/db_world/2024_11_21_00.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- DB update 2024_11_20_07 -> 2024_11_21_00
|
||||
--
|
||||
-- Akil'zon
|
||||
UPDATE `creature_loot_template` SET `MaxCount` = 1 WHERE `Entry` = 23574 AND `Reference` = 34150;
|
||||
-- Nalorakk
|
||||
UPDATE `creature_loot_template` SET `MaxCount` = 1 WHERE `Entry` = 23576 AND `Reference` = 34151;
|
||||
-- Jan'alai
|
||||
UPDATE `creature_loot_template` SET `MaxCount` = 1 WHERE `Entry` = 23578 AND `Reference` = 34152;
|
||||
-- Halazzi
|
||||
UPDATE `creature_loot_template` SET `MaxCount` = 1 WHERE `Entry` = 23577 AND `Reference` = 34153;
|
||||
36
data/sql/updates/db_world/2024_11_21_01.sql
Normal file
36
data/sql/updates/db_world/2024_11_21_01.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- DB update 2024_11_21_00 -> 2024_11_21_01
|
||||
--
|
||||
-- James Hyal (1/2) requirement removed from James Hyal (2/2)
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 1302);
|
||||
|
||||
-- Little Pamela requirement removed from Pamela's Doll
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 5142);
|
||||
|
||||
-- Sister Pamela requirement removed from Pamela's Doll
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 5601);
|
||||
|
||||
-- Uncle Carlin requirement removed from Defenders of Darrowshire
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 5211);
|
||||
|
||||
-- A Troubled Spirit requirement removed from Warrior Kinship
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 8423);
|
||||
|
||||
-- A Call to Arms: The Plaguelands! requirement removed from Clear the Way
|
||||
-- Stormwind
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 5066);
|
||||
-- Ironforge
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 5090);
|
||||
-- Darnassus
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 5091);
|
||||
-- Exodar
|
||||
UPDATE `quest_template_addon` SET `NextQuestID` = 0 WHERE (`ID` = 10373);
|
||||
|
||||
-- Malin's Request (1/2) requirement removed from Worth Its Weight in Gold
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 691);
|
||||
|
||||
-- Tran'rek requirement removed from Scarab Shells
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 2865);
|
||||
|
||||
-- Stoley's Debt requirement removed from Stoley's Shipment
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 2873);
|
||||
|
||||
5281
data/sql/updates/db_world/2024_11_21_02.sql
Normal file
5281
data/sql/updates/db_world/2024_11_21_02.sql
Normal file
File diff suppressed because it is too large
Load Diff
3
data/sql/updates/db_world/2024_11_22_00.sql
Normal file
3
data/sql/updates/db_world/2024_11_22_00.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_21_02 -> 2024_11_22_00
|
||||
--
|
||||
UPDATE `creature_loot_template` SET `MinCount` = 2, `MaxCount` = 3 WHERE `Entry` = 24239 AND `Reference` = 34078;
|
||||
11
data/sql/updates/db_world/2024_11_22_01.sql
Normal file
11
data/sql/updates/db_world/2024_11_22_01.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
-- DB update 2024_11_22_00 -> 2024_11_22_01
|
||||
--
|
||||
-- fix (db/Quest) - Makes a bunch of "mandatory" quests into "optional" 2.0
|
||||
-- The Spirits of Stonetalon requirement removed from Goblin Invaders
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 1062);
|
||||
|
||||
-- Lost Deathstalkers requirement removed from Wild Hearts
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 429);
|
||||
|
||||
-- Vital Intelligence requirement removed from At War With The Scarlet Crusade (1/4)
|
||||
UPDATE `quest_template_addon` SET `PrevQuestID` = 0 WHERE (`ID` = 427);
|
||||
4
data/sql/updates/db_world/2024_11_22_02.sql
Normal file
4
data/sql/updates/db_world/2024_11_22_02.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_22_01 -> 2024_11_22_02
|
||||
--
|
||||
-- fix(db/Creature) - Bonechewer Behemoth isn't immune to Distract anymore
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` &~ 8 WHERE `entry` = 23196;
|
||||
3
data/sql/updates/db_world/2024_11_22_03.sql
Normal file
3
data/sql/updates/db_world/2024_11_22_03.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_22_02 -> 2024_11_22_03
|
||||
DELETE FROM `spell_custom_attr` WHERE `spell_id`=43299;
|
||||
INSERT INTO `spell_custom_attr` (`spell_id`, `attributes`) VALUES (43299, 4194304);
|
||||
7
data/sql/updates/db_world/2024_11_23_00.sql
Normal file
7
data/sql/updates/db_world/2024_11_23_00.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- DB update 2024_11_22_03 -> 2024_11_23_00
|
||||
--
|
||||
-- Deletes creatures by GUID that are `Wild Turkey` outside of zones 15 and 85 (Elwynn Forest and Tirisfal Glades)
|
||||
DELETE FROM `creature` WHERE `guid` IN (241977, 242000, 242012, 243830, 243874, 243955, 243968, 243970, 243972, 243984, 243985, 243986, 243987, 243988, 243989, 243990, 243991, 243992, 243993, 243994, 243995, 243996, 243997, 243998, 243999, 244000, 244001, 244002, 244003, 244004, 244005, 244006, 244007, 244008, 244009, 244010, 244073, 244076, 244098, 244117, 244124, 244125, 244186, 244189, 244208, 244209, 244285, 244308, 244309, 244310, 244311, 244312, 244313, 244314, 244315, 244316, 244317, 244318, 244319, 244320, 244321, 244322, 244323, 244324, 244325, 241971, 243863, 243944, 244100, 244101, 244119, 244220, 244221, 244295, 240654, 243959, 244094, 244114, 244115, 244116, 240656, 244108, 244140, 244141, 244142, 240655, 240658, 240659, 240703, 240742, 240764, 243776, 243777, 243778, 243787, 243943, 243957, 244136, 244137, 244138, 244139, 244204, 244205, 242032, 242033, 242034, 242035, 242036, 242037, 243949, 244087, 244112, 244173, 244174, 244286, 244307, 242149, 242151, 242153, 242156, 242158, 242163, 242164, 242167, 242168, 242170, 242171, 242176, 242177, 242178, 242179, 242187, 242203, 243865, 243945, 243961, 243962, 243963, 243964, 240419, 240420, 240645, 243947, 243950, 244088, 244089, 244090, 244091, 244143, 244144, 244145, 244146, 244212, 244213, 244306, 242103, 242104, 242116, 242117, 242123, 242124, 242127, 242128, 242130, 242132, 242135, 242142, 242144, 243862, 241994, 241995, 241996, 241997, 241998, 241999, 242001, 242002, 242003, 242004, 242005, 242006, 242007, 242008, 242009, 242010, 242011, 242013, 242014, 242016, 242017, 242018, 242019, 242020, 242021, 242022, 242023, 242024, 242025, 242026, 242027, 242028, 242029, 242030, 243832, 243956, 244099, 244118, 244126, 244127, 240657, 240661, 240721, 240723, 240804, 240810, 240811, 240991, 243836, 243837, 243838, 243839, 243840, 243841, 243871, 243954, 244051, 244052, 244053, 244057, 244058, 244061, 244062, 244155, 244156, 244157, 244158, 244175, 244202, 244203, 244228, 244229, 244230, 243826, 241415, 241453, 241603, 241605, 241625, 241666, 243952, 244086, 244109, 244110, 244122, 244177, 244206, 244207, 244287, 244288, 242040, 242043, 243946, 243958, 244092, 244093, 244113, 244128, 244132, 244133, 244134, 244135, 241968, 241969, 241970, 244084, 244085, 244167, 244168, 244169, 244170, 244231, 244290, 244291, 244292, 244293, 244294, 242061, 242064, 242065, 242066, 242071, 242072, 242073, 242077, 242079, 242081, 242084, 242094, 242096, 242099, 242101, 242102, 242105, 242114, 242115, 243953, 244102, 244103, 244104, 244111, 244120, 244129, 244130, 244131, 241972, 243864, 242045, 242058, 242062, 242063, 242067, 242068, 242069, 242070, 242074, 242075, 242078, 242082, 242083, 242085, 242086, 242087, 242088, 242089, 242090, 242091, 242092, 242093, 242095, 242097, 242098, 242100, 242106, 242107, 242108, 242109, 242110, 242111, 242112, 242113, 242118, 242119, 242120, 242121, 242122, 242125, 242126, 242129, 242131, 242133, 242134, 242136, 242137, 242138, 242139, 242140, 242141, 242143, 242145, 242146, 242147, 242148, 242150, 242152, 242154, 242155, 242157, 242159, 242160, 242161, 242162, 242165, 242166, 242169, 242172, 242173, 242174, 242175, 242180, 242181, 242182, 242183, 242184, 242185, 242186, 242188, 242189, 242190, 242191, 242192, 242193, 242194, 242195, 242196, 242197, 242198, 242199, 242200, 242201, 242202, 242204, 242205, 242206, 242207, 242208, 242209, 242210, 242211, 242212, 242213, 242214, 242216, 242217, 242218, 242219, 242221, 242222, 242223, 242224, 242225, 242226, 242227, 242228, 242229, 242230, 242231, 242232, 242233, 242234, 242235, 242236, 242237, 242238, 242239, 242240, 243711, 243876, 244163, 244164, 244165, 244166, 242215, 242763, 243381, 243930, 242044, 242046, 242047, 242048, 242049, 242050, 242051, 242052, 242053, 242054, 242056, 242057, 242059, 242060, 242080, 243782, 243783, 243784, 243785, 243786, 243788, 243789, 243877, 243948, 244147, 244148, 244149, 244150, 244159, 244160, 244171, 244172, 244216, 244217, 244222, 244223, 243548, 243558, 243560, 243570, 243573, 243575, 243580, 243589, 243875, 243931, 243932, 243933, 243934, 243935, 243936, 243937, 243938, 243939, 243940, 243941, 244011, 244012, 244013, 244014, 244015, 244016, 244017, 244018, 244019, 244020, 244021, 244105, 244106, 244107, 244121, 244185, 244187, 244214, 244215, 244348, 244349, 244350, 244351, 244352, 244353, 244354, 244355, 244356, 244357, 244358, 244359, 244360, 244361, 244362, 244363, 241712, 241715, 241771, 241777, 241800, 241811, 241815, 241818, 241820, 241823, 241837, 241839, 241845, 241860, 241862, 241864, 241865, 241870, 241871, 241878, 241880, 241882, 241908, 241923, 241928, 241929, 241935, 241938, 241940, 241941, 241944, 241948, 241949, 241951, 241958, 241961, 241962, 243774, 243775, 243810, 243929, 244161, 244162, 244200, 244201, 244233, 244151, 244152, 244153, 244154, 244210, 244211) AND `id1` = 32820;
|
||||
|
||||
-- Deletes the same GUIDs as above from game_event_creature that has the event 26 (Pilgrim's Bounty)
|
||||
DELETE FROM `game_event_creature` WHERE `guid` IN (240419, 240420, 240645, 240654, 240655, 240656, 240657, 240658, 240659, 240661, 240703, 240721, 240723, 240742, 240764, 240804, 240810, 240811, 240991, 241415, 241453, 241603, 241605, 241625, 241666, 241712, 241715, 241771, 241777, 241800, 241811, 241815, 241818, 241820, 241823, 241837, 241839, 241845, 241860, 241862, 241864, 241865, 241870, 241871, 241878, 241880, 241882, 241908, 241923, 241928, 241929, 241935, 241938, 241940, 241941, 241944, 241948, 241949, 241951, 241958, 241961, 241962, 241968, 241969, 241970, 241971, 241972, 241977, 241994, 241995, 241996, 241997, 241998, 241999, 242000, 242001, 242002, 242003, 242004, 242005, 242006, 242007, 242008, 242009, 242010, 242011, 242012, 242013, 242014, 242016, 242017, 242018, 242019, 242020, 242021, 242022, 242023, 242024, 242025, 242026, 242027, 242028, 242029, 242030, 242032, 242033, 242034, 242035, 242036, 242037, 242040, 242043, 242044, 242045, 242046, 242047, 242048, 242049, 242050, 242051, 242052, 242053, 242054, 242056, 242057, 242058, 242059, 242060, 242061, 242062, 242063, 242064, 242065, 242066, 242067, 242068, 242069, 242070, 242071, 242072, 242073, 242074, 242075, 242077, 242078, 242079, 242080, 242081, 242082, 242083, 242084, 242085, 242086, 242087, 242088, 242089, 242090, 242091, 242092, 242093, 242094, 242095, 242096, 242097, 242098, 242099, 242100, 242101, 242102, 242103, 242104, 242105, 242106, 242107, 242108, 242109, 242110, 242111, 242112, 242113, 242114, 242115, 242116, 242117, 242118, 242119, 242120, 242121, 242122, 242123, 242124, 242125, 242126, 242127, 242128, 242129, 242130, 242131, 242132, 242133, 242134, 242135, 242136, 242137, 242138, 242139, 242140, 242141, 242142, 242143, 242144, 242145, 242146, 242147, 242148, 242149, 242150, 242151, 242152, 242153, 242154, 242155, 242156, 242157, 242158, 242159, 242160, 242161, 242162, 242163, 242164, 242165, 242166, 242167, 242168, 242169, 242170, 242171, 242172, 242173, 242174, 242175, 242176, 242177, 242178, 242179, 242180, 242181, 242182, 242183, 242184, 242185, 242186, 242187, 242188, 242189, 242190, 242191, 242192, 242193, 242194, 242195, 242196, 242197, 242198, 242199, 242200, 242201, 242202, 242203, 242204, 242205, 242206, 242207, 242208, 242209, 242210, 242211, 242212, 242213, 242214, 242215, 242216, 242217, 242218, 242219, 242221, 242222, 242223, 242224, 242225, 242226, 242227, 242228, 242229, 242230, 242231, 242232, 242233, 242234, 242235, 242236, 242237, 242238, 242239, 242240, 242763, 243381, 243548, 243558, 243560, 243570, 243573, 243575, 243580, 243589, 243711, 243774, 243775, 243776, 243777, 243778, 243782, 243783, 243784, 243785, 243786, 243787, 243788, 243789, 243810, 243826, 243830, 243832, 243836, 243837, 243838, 243839, 243840, 243841, 243862, 243863, 243864, 243865, 243871, 243874, 243875, 243876, 243877, 243929, 243930, 243931, 243932, 243933, 243934, 243935, 243936, 243937, 243938, 243939, 243940, 243941, 243943, 243944, 243945, 243946, 243947, 243948, 243949, 243950, 243952, 243953, 243954, 243955, 243956, 243957, 243958, 243959, 243961, 243962, 243963, 243964, 243968, 243970, 243972, 243984, 243985, 243986, 243987, 243988, 243989, 243990, 243991, 243992, 243993, 243994, 243995, 243996, 243997, 243998, 243999, 244000, 244001, 244002, 244003, 244004, 244005, 244006, 244007, 244008, 244009, 244010, 244011, 244012, 244013, 244014, 244015, 244016, 244017, 244018, 244019, 244020, 244021, 244051, 244052, 244053, 244057, 244058, 244061, 244062, 244073, 244076, 244084, 244085, 244086, 244087, 244088, 244089, 244090, 244091, 244092, 244093, 244094, 244098, 244099, 244100, 244101, 244102, 244103, 244104, 244105, 244106, 244107, 244108, 244109, 244110, 244111, 244112, 244113, 244114, 244115, 244116, 244117, 244118, 244119, 244120, 244121, 244122, 244124, 244125, 244126, 244127, 244128, 244129, 244130, 244131, 244132, 244133, 244134, 244135, 244136, 244137, 244138, 244139, 244140, 244141, 244142, 244143, 244144, 244145, 244146, 244147, 244148, 244149, 244150, 244151, 244152, 244153, 244154, 244155, 244156, 244157, 244158, 244159, 244160, 244161, 244162, 244163, 244164, 244165, 244166, 244167, 244168, 244169, 244170, 244171, 244172, 244173, 244174, 244175, 244177, 244185, 244186, 244187, 244189, 244200, 244201, 244202, 244203, 244204, 244205, 244206, 244207, 244208, 244209, 244210, 244211, 244212, 244213, 244214, 244215, 244216, 244217, 244220, 244221, 244222, 244223, 244228, 244229, 244230, 244231, 244233, 244285, 244286, 244287, 244288, 244290, 244291, 244292, 244293, 244294, 244295, 244306, 244307, 244308, 244309, 244310, 244311, 244312, 244313, 244314, 244315, 244316, 244317, 244318, 244319, 244320, 244321, 244322, 244323, 244324, 244325, 244348, 244349, 244350, 244351, 244352, 244353, 244354, 244355, 244356, 244357, 244358, 244359, 244360, 244361, 244362, 244363) AND `eventEntry` = 26;
|
||||
6
data/sql/updates/db_world/2024_11_23_01.sql
Normal file
6
data/sql/updates/db_world/2024_11_23_01.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
-- DB update 2024_11_23_00 -> 2024_11_23_01
|
||||
--
|
||||
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (45340, 43962));
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13, 1, 43962, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, '', 'Summon Amani\'shi Hatcher target World Trigger'),
|
||||
(13, 1, 45340, 0, 0, 31, 0, 3, 22515, 0, 0, 0, 0, '', 'Summon Amani\'shi Hatcher target World Trigger');
|
||||
22
data/sql/updates/db_world/2024_11_24_00.sql
Normal file
22
data/sql/updates/db_world/2024_11_24_00.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
-- DB update 2024_11_23_01 -> 2024_11_24_00
|
||||
--
|
||||
-- not selectable
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags` | 33554432 WHERE (`entry` = 24223);
|
||||
-- root
|
||||
UPDATE `creature_template_movement` SET `Rooted` = 1 WHERE (`CreatureId` = 24223);
|
||||
|
||||
SET @GUID:=38464;
|
||||
DELETE FROM `creature` WHERE (`id1` = 24223) AND (`guid` BETWEEN (@GUID+00) AND (@GUID+11));
|
||||
INSERT INTO `creature` (`guid`, `id1`, `id2`, `id3`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`, `ScriptName`, `VerifiedBuild`) VALUES
|
||||
(@GUID+00, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 231.7856, 1477.3315, 26.000067, 0.541052043437957763, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+01, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 227.88835, 1452.7626, 26.000414, 3.001966238021850585, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+02, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 228.48058, 1433.1262, 27.387426, 2.58308720588684082, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+03, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 227.02995, 1417.4744, 32.817062, 2.757620096206665039, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+04, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 227.65094, 1404.276, 37.13389, 2.321287870407104492, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+05, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 227.5511, 1382.4186, 44.78124, 0.174532920122146606, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+06, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 229.57564, 1361.4746, 49.162132, 5.218534469604492187, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+07, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 246.97385, 1356.4729, 49.40504, 1.2042771577835083, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+08, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 261.45508, 1402.2993, 49.40504, 2.0245819091796875, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+09, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 245.92024, 1374.8492, 49.404884, 3.40339207649230957, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+10, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 253.92784, 1429.9912, 49.40504, 2.181661605834960937, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788),
|
||||
(@GUID+11, 24223, 0, 0, 568, 0, 0, 1, 1, 0, 281.30252, 1430.9957, 61.60976, 0.087266460061073303, 7200, 0, 0, 3827, 0, 0, 0, 0, 0, '', 53788);
|
||||
4
data/sql/updates/db_world/2024_11_24_01.sql
Normal file
4
data/sql/updates/db_world/2024_11_24_01.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_24_00 -> 2024_11_24_01
|
||||
--
|
||||
-- Adds "Disarm" immunity to Creautre (Boss) "Halazzi" - [Zul'Aman]
|
||||
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask` | 4 WHERE `entry` = 23577;
|
||||
5
data/sql/updates/db_world/2024_11_24_02.sql
Normal file
5
data/sql/updates/db_world/2024_11_24_02.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
-- DB update 2024_11_24_01 -> 2024_11_24_02
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 23817) AND (`source_type` = 0) AND (`id` IN (1));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(23817, 0, 1, 0, 8, 0, 100, 0, 43144, 0, 0, 0, 0, 0, 11, 42493, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Dragonhawk Egg - On Spellhit \'Hatch Eggs\' - Cast \'Summon Dragonhawk Hatchling\'');
|
||||
35
data/sql/updates/db_world/2024_11_24_03.sql
Normal file
35
data/sql/updates/db_world/2024_11_24_03.sql
Normal file
@@ -0,0 +1,35 @@
|
||||
-- DB update 2024_11_24_02 -> 2024_11_24_03
|
||||
--
|
||||
-- IMMUNE_TO_PC
|
||||
UPDATE `creature_template` SET `unit_flags` = `unit_flags` | 256 WHERE (`entry` = 24358);
|
||||
|
||||
-- purge old waypoints
|
||||
DELETE FROM `waypoint_data` WHERE `id`=860442;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=860441;
|
||||
DELETE FROM `waypoint_data` WHERE `id`=860440;
|
||||
|
||||
-- verify model 22340
|
||||
UPDATE `creature_template_model` SET `VerifiedBuild` = 53788 WHERE (`CreatureID` = 24358) AND `Idx` = 0;
|
||||
|
||||
-- text
|
||||
-- broadcast text still says three
|
||||
UPDATE `creature_text` SET `Text`='Suit yourself. At least five of you must assist me if we\'re to get inside. Follow me....' WHERE `CreatureID`=24358 AND `GroupID`=0 AND `ID`=0;
|
||||
|
||||
-- to gong
|
||||
DELETE FROM `waypoint_data` WHERE `id` = 2435800;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `delay`, `move_type`) VALUES
|
||||
(2435800, 1, 123.585014, 1646.5702, 42.208447, NULL, 0, 1),
|
||||
(2435800, 2, 130.58502, 1644.0702, 42.208447, NULL, 0, 1),
|
||||
(2435800, 3, 131.15666, 1643.7225, 42.18348, NULL, 0, 1);
|
||||
|
||||
-- to door
|
||||
DELETE FROM `waypoint_data` WHERE `id` = 2435801;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`) VALUES
|
||||
(2435801, 1, 126.804565, 1641.6201, 42.500977),
|
||||
(2435801, 2, 121.95248, 1639.0178, 42.318478),
|
||||
(2435801, 3, 120.78983, 1609.0632, 43.555756);
|
||||
|
||||
-- stealth
|
||||
DELETE FROM `waypoint_data` WHERE `id` = 2435802;
|
||||
INSERT INTO `waypoint_data` (`id`, `point`, `position_x`, `position_y`, `position_z`) VALUES
|
||||
(2435802, 1, 120.59397, 1587.591, 43.74926);
|
||||
3
data/sql/updates/db_world/2024_11_24_04.sql
Normal file
3
data/sql/updates/db_world/2024_11_24_04.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_24_03 -> 2024_11_24_04
|
||||
--
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 3678) AND (`source_type` = 0) AND (`id` IN (26));
|
||||
3
data/sql/updates/db_world/2024_11_24_05.sql
Normal file
3
data/sql/updates/db_world/2024_11_24_05.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- DB update 2024_11_24_04 -> 2024_11_24_05
|
||||
--
|
||||
UPDATE `spell_area` SET `gender` = 2 WHERE `spell` IN (43816, 43818, 43820, 43822);
|
||||
4
data/sql/updates/db_world/2024_11_24_06.sql
Normal file
4
data/sql/updates/db_world/2024_11_24_06.sql
Normal file
@@ -0,0 +1,4 @@
|
||||
-- DB update 2024_11_24_05 -> 2024_11_24_06
|
||||
-- disable SmartAI for creatures and gameobjects without SmartAI entries
|
||||
UPDATE `creature_template` SET `AIName` = '' WHERE (`entry` IN (100, 10042, 10158, 1020, 10296, 10337, 10338, 1039, 10639, 11018, 1128, 11327, 114, 11698, 11724, 11725, 11789, 11858, 11918, 1199, 1201, 12160, 1224, 13017, 13159, 14275, 14276, 14369, 14378, 15186, 1520, 1537, 1543, 1547, 1548, 1549, 15591, 15651, 15652, 16054, 16069, 1654, 1655, 1656, 1658, 16591, 16599, 1662, 16764, 1693, 17056, 17405, 17417, 17493, 17558, 1770, 18043, 18075, 18076, 18521, 1869, 1871, 19048, 1934, 1935, 19355, 19421, 19425, 19426, 19432, 19562, 19579, 19580, 19647, 19653, 19686, 1972, 19836, 19932, 20154, 20480, 20520, 20710, 20825, 21456, 2164, 21867, 22134, 22265, 2248, 2275, 23146, 232, 2321, 2322, 2323, 23401, 2347, 23845, 23852, 23853, 23854, 23855, 24043, 24385, 24717, 2473, 2474, 24821, 24826, 24827, 24828, 24829, 24831, 24832, 24837, 24958, 2535, 2536, 25471, 25472, 25473, 2559, 25751, 2578, 2723, 2735, 2736, 2773, 2780, 2781, 2782, 27896, 27897, 27993, 28206, 28355, 28374, 28843, 28878, 2923, 2944, 29500, 29620, 29915, 3, 30315, 30316, 30317, 30318, 30423, 30889, 31195, 31418, 32326, 32364, 32367, 32711, 3285, 3476, 36, 36508, 3722, 37782, 3812, 3814, 39371, 39372, 3988, 3999, 4130, 4388, 4390, 4419, 4620, 4661, 4687, 5061, 5192, 5246, 5253, 5260, 5292, 5293, 5300, 5435, 5461, 5477, 5602, 5622, 5850, 5853, 6020, 6068, 6093, 6233, 6352, 7032, 7067, 7287, 7307, 7369, 756, 757, 822, 8256, 8447, 862, 880, 92, 5287, 4389, 4872));
|
||||
UPDATE `gameobject_template` SET `AIName` = '' WHERE (`entry` IN (164881, 164882, 164883, 164884, 173325, 173326, 174609, 174616, 174617, 174618, 174619, 174620, 174621, 174622, 174623, 174624, 174625, 174685, 174687, 174710, 174711, 179829, 186432));
|
||||
32
data/sql/updates/db_world/2024_11_24_07.sql
Normal file
32
data/sql/updates/db_world/2024_11_24_07.sql
Normal file
@@ -0,0 +1,32 @@
|
||||
-- DB update 2024_11_24_06 -> 2024_11_24_07
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 28576;
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28576) AND (`source_type` = 0) AND (`id` IN (8));
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(28576, 0, 8, 0, 4, 0, 100, 0, 0, 0, 0, 0, 0, 0, 86, 58207, 0, 10, 128581, 28765, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 'Citizen of Havenshire - On Aggro - Cross Cast \'Lich King VO Blocker\'');
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 22 AND `SourceEntry` = 28576 AND `SourceId` = 0;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `Comment`) VALUES
|
||||
(22, 9, 28576, 0, 0, 14, 0, 12678, 0, 0, 1, 'Action invoker has finished or active quest If Chaos Drives, Let Suffering Hold The Reins (12678)');
|
||||
|
||||
DELETE
|
||||
FROM `spell_script_names`
|
||||
WHERE `spell_id` BETWEEN 58207 AND 58223;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(58207, 'spell_lich_king_vo_blocker'),
|
||||
(58208, 'spell_lich_king_whisper'),
|
||||
(58209, 'spell_lich_king_whisper'),
|
||||
(58210, 'spell_lich_king_whisper'),
|
||||
(58211, 'spell_lich_king_whisper'),
|
||||
(58212, 'spell_lich_king_whisper'),
|
||||
(58213, 'spell_lich_king_whisper'),
|
||||
(58214, 'spell_lich_king_whisper'),
|
||||
(58215, 'spell_lich_king_whisper'),
|
||||
(58216, 'spell_lich_king_whisper'),
|
||||
(58217, 'spell_lich_king_whisper'),
|
||||
(58218, 'spell_lich_king_whisper'),
|
||||
(58219, 'spell_lich_king_whisper'),
|
||||
(58220, 'spell_lich_king_whisper'),
|
||||
(58221, 'spell_lich_king_whisper'),
|
||||
(58222, 'spell_lich_king_whisper'),
|
||||
(58223, 'spell_lich_king_whisper');
|
||||
261
deps/mysqllite/CMakeLists.txt
vendored
261
deps/mysqllite/CMakeLists.txt
vendored
@@ -1,261 +0,0 @@
|
||||
# Copyright (C) 2006 MySQL AB
|
||||
# Copyright (C)
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
# Include the platform-specific file.
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/os/Windows.cmake)
|
||||
|
||||
# Add macros
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/character_sets.cmake)
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/mysql_version.cmake)
|
||||
|
||||
# Advanced options (mostly useless, but usually still in config.h, so they need to be set...)
|
||||
set(CYBOZU OFF)
|
||||
set(BACKUP_TEST OFF)
|
||||
set(ENABLED_LOCAL_INFILE ON)
|
||||
set(WITH_FAST_MUTEXES OFF)
|
||||
|
||||
# Handle useful options - hardcode to ON/OFF
|
||||
set(ENABLED_PROFILING OFF)
|
||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS $<$<CONFIG:Debug>:ENABLED_DEBUG_SYNC)
|
||||
|
||||
# Set DBUG_OFF and other optional release-only flags for non-debug project types
|
||||
foreach(BUILD_TYPE RELEASE RELWITHDEBINFO MINSIZEREL)
|
||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_<CONFIG> DBUG_OFF)
|
||||
if(WITH_FAST_MUTEXES)
|
||||
set_directory_properties(PROPERTIES COMPILE_DEFINITIONS_<CONFIG> "MY_PTHREAD_FASTMUTEX=1")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Set commonly used variables
|
||||
set(DEFAULT_MYSQL_HOME "C:/Program Files/MySQL/MySQL Server ${MYSQL_BASE_VERSION}" )
|
||||
set(SHAREDIR share)
|
||||
set(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")
|
||||
set(MYSQL_DATADIR "${DEFAULT_MYSQL_HOME}/data")
|
||||
set(DEFAULT_CHARSET_HOME "${DEFAULT_MYSQL_HOME}")
|
||||
set(PLUGINDIR "${DEFAULT_MYSQL_HOME}/lib/plugin")
|
||||
|
||||
set(COMPILATION_COMMENT "Source distribution lite for AzerothCore")
|
||||
|
||||
# Run platform tests
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/configure.cmake)
|
||||
|
||||
# Use system openssl.
|
||||
add_definitions(-DHAVE_OPENSSL)
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_BINARY_DIR}
|
||||
${OPENSSL_INCLUDE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/deps/zlib
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/include/internal
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dbug
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql
|
||||
)
|
||||
|
||||
set(DBUG_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dbug/dbug.c
|
||||
)
|
||||
|
||||
set(STRINGS_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/bchange.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/bmove_upp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-big5.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-bin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-cp932.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-czech.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-euc_kr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-extra.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-gb2312.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-gbk.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-latin1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-mb.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-simple.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-tis620.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-uca.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-ucs2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-utf8.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype-win1250ch.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/ctype.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/decimal.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/dtoa.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/int2str.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/is_prefix.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/llstr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/longlong2str.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_strtoll10.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_vsnprintf.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/str2int.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/str_alloc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strcend.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strend.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strfill.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strmake.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strmov.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strnmov.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strxmov.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strxnmov.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/xml.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/my_strchr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strcont.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/strings/strappend.c
|
||||
)
|
||||
if(NOT HAVE_STRNLEN)
|
||||
# OSX does not have strnlen
|
||||
set(STRINGS_SOURCES ${STRINGS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/strings/strnlen.c)
|
||||
endif()
|
||||
|
||||
set(VIO_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vio/vio.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vio/viosocket.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vio/viossl.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vio/viosslfactories.c
|
||||
)
|
||||
|
||||
set(MYSYS_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/array.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/charset-def.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/charset.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/checksum.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/default.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/errors.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/hash.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/list.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/md5.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_cache.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_dirname.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_fn_ext.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_format.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_getdate.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_iocache.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_iocache2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_keycache.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_keycaches.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_loadpath.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_pack.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_path.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_qsort.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_qsort2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_radix.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_same.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_sort.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_soundex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_arr_appstr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_tempdir.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_tempfile.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_unixpath.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mf_wcomp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/mulalloc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_access.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_aes.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_alloc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_bit.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_bitmap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_chsize.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_compress.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_copy.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_create.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_delete.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_div.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_error.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_file.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_fopen.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_fstream.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_gethostbyname.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_gethwaddr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getopt.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getsystime.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getwd.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_handler.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_init.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lock.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_malloc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mess.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mkdir.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_mmap.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_once.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_open.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_pread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_pthread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_quick.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_read.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_redel.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_rename.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_seek.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_sleep.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_static.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_symlink.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_symlink2.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_sync.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_thr_init.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_write.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/ptr_cmp.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/queues.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/stacktrace.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/rijndael.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/sha1.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/string.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_alarm.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_lock.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_mutex.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/thr_rwlock.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/tree.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/typelib.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/base64.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_memmem.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getpagesize.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_alloc-pin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_dynarray.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/lf_hash.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_atomic.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_getncpus.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_rdtsc.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winthread.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_wincond.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winerr.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_winfile.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_windac.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_conio.c
|
||||
)
|
||||
if(HAVE_ALARM)
|
||||
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_alarm.c)
|
||||
endif()
|
||||
if(HAVE_LARGE_PAGES)
|
||||
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_largepage.c)
|
||||
endif()
|
||||
if(HAVE_MLOCK)
|
||||
set(MYSYS_SOURCES ${MYSYS_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/mysys/my_lockmem.c)
|
||||
endif()
|
||||
|
||||
set(CLIENT_SOURCES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/get_password.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/libmysql.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/libmysql/errmsg.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/client.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/my_time.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/client_plugin.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql/net_serv.cc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql-common/pack.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sql/password.c
|
||||
)
|
||||
|
||||
configure_file(config.h.cmake ${CMAKE_BINARY_DIR}/my_config.h)
|
||||
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/internal/mysql_version.h.in ${CMAKE_BINARY_DIR}/mysql_version.h)
|
||||
|
||||
add_version_info(libmysql CLIENT_SOURCES)
|
||||
add_library(libmysql SHARED ${CLIENT_SOURCES} ${DBUG_SOURCES} ${MYSYS_SOURCES} ${STRINGS_SOURCES} ${VIO_SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/libmysql/libmysql_exports.def)
|
||||
target_link_libraries(libmysql zlib ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBRARIES} ws2_32)
|
||||
|
||||
install(TARGETS libmysql RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
339
deps/mysqllite/COPYING
vendored
339
deps/mysqllite/COPYING
vendored
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
2254
deps/mysqllite/README
vendored
2254
deps/mysqllite/README
vendored
File diff suppressed because it is too large
Load Diff
4
deps/mysqllite/VERSION
vendored
4
deps/mysqllite/VERSION
vendored
@@ -1,4 +0,0 @@
|
||||
MYSQL_VERSION_MAJOR=5
|
||||
MYSQL_VERSION_MINOR=5
|
||||
MYSQL_VERSION_PATCH=9
|
||||
MYSQL_VERSION_EXTRA=
|
||||
43
deps/mysqllite/cmake/character_sets.cmake
vendored
43
deps/mysqllite/cmake/character_sets.cmake
vendored
@@ -1,43 +0,0 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#Charsets and collations
|
||||
IF(NOT DEFAULT_CHARSET)
|
||||
SET(DEFAULT_CHARSET "latin1")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT DEFAULT_COLLATIONS)
|
||||
SET(DEFAULT_COLLATION "latin1_swedish_ci")
|
||||
ENDIF()
|
||||
|
||||
SET(CHARSETS_AVAILABLE
|
||||
binary armscii8 ascii big5 cp1250 cp1251 cp1256 cp1257
|
||||
cp850 cp852 cp866 cp932 dec8 euckr gb2312 gbk geostd8
|
||||
greek hebrew hp8 keybcs2 koi8r koi8u
|
||||
latin1 latin2 latin5 latin7 macce macroman
|
||||
swe7 tis620 ucs2 utf8 utf8mb4 utf16 utf32)
|
||||
|
||||
SET(MYSQL_DEFAULT_CHARSET_NAME "${DEFAULT_CHARSET}")
|
||||
SET(MYSQL_DEFAULT_COLLATION_NAME "${DEFAULT_COLLATION}")
|
||||
|
||||
FOREACH(cs in ${CHARSETS_AVAILABLE})
|
||||
SET(HAVE_CHARSET_${cs} 1)
|
||||
ENDFOREACH()
|
||||
|
||||
SET(HAVE_UCA_COLLATIONS 1)
|
||||
|
||||
SET(HAVE_UTF8_GENERAL_CS 1)
|
||||
SET(USE_MB 1)
|
||||
SET(USE_MB_IDENT 1)
|
||||
107
deps/mysqllite/cmake/mysql_version.cmake
vendored
107
deps/mysqllite/cmake/mysql_version.cmake
vendored
@@ -1,107 +0,0 @@
|
||||
# Copyright (C) 2009 Sun Microsystems, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
#
|
||||
# Global constants, only to be changed between major releases.
|
||||
#
|
||||
|
||||
SET(SHARED_LIB_MAJOR_VERSION "16")
|
||||
SET(PROTOCOL_VERSION "10")
|
||||
SET(DOT_FRM_VERSION "6")
|
||||
|
||||
# Generate "something" to trigger cmake rerun when VERSION changes
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/VERSION
|
||||
${CMAKE_CURRENT_BINARY_DIR}/VERSION.dep
|
||||
)
|
||||
|
||||
# Read value for a variable from VERSION.
|
||||
|
||||
MACRO(MYSQL_GET_CONFIG_VALUE keyword var)
|
||||
IF(NOT ${var})
|
||||
FILE (STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/VERSION str REGEX "^[ ]*${keyword}=")
|
||||
IF(str)
|
||||
STRING(REPLACE "${keyword}=" "" str ${str})
|
||||
STRING(REGEX REPLACE "[ ].*" "" str "${str}")
|
||||
SET(${var} ${str})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
# Read mysql version for configure script
|
||||
|
||||
MACRO(GET_MYSQL_VERSION)
|
||||
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MAJOR" MAJOR_VERSION)
|
||||
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MINOR" MINOR_VERSION)
|
||||
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION)
|
||||
MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION)
|
||||
|
||||
IF(NOT MAJOR_VERSION OR NOT MINOR_VERSION OR NOT PATCH_VERSION)
|
||||
MESSAGE(FATAL_ERROR "VERSION file cannot be parsed.")
|
||||
ENDIF()
|
||||
|
||||
SET(VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}${EXTRA_VERSION}")
|
||||
MESSAGE("-- MySQL ${VERSION}")
|
||||
SET(MYSQL_BASE_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}" CACHE INTERNAL "MySQL Base version")
|
||||
SET(MYSQL_NO_DASH_VERSION "${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}")
|
||||
STRING(REPLACE "-" "_" MYSQL_RPM_VERSION "${VERSION}")
|
||||
MATH(EXPR MYSQL_VERSION_ID "10000*${MAJOR_VERSION} + 100*${MINOR_VERSION} + ${PATCH_VERSION}")
|
||||
ENDMACRO()
|
||||
|
||||
# Get mysql version and other interesting variables
|
||||
GET_MYSQL_VERSION()
|
||||
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "3306")
|
||||
|
||||
IF(NOT MYSQL_TCP_PORT)
|
||||
SET(MYSQL_TCP_PORT ${MYSQL_TCP_PORT_DEFAULT})
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "0")
|
||||
ELSEIF(MYSQL_TCP_PORT EQUAL MYSQL_TCP_PORT_DEFAULT)
|
||||
SET(MYSQL_TCP_PORT_DEFAULT "0")
|
||||
ENDIF()
|
||||
|
||||
|
||||
IF(NOT MYSQL_UNIX_ADDR)
|
||||
SET(MYSQL_UNIX_ADDR "/tmp/mysql.sock")
|
||||
ENDIF()
|
||||
IF(NOT COMPILATION_COMMENT)
|
||||
SET(COMPILATION_COMMENT "Source distribution lite for Trinity Core")
|
||||
ENDIF()
|
||||
|
||||
# Windows 'date' command has unpredictable output, so cannot rely on it to
|
||||
# set MYSQL_COPYRIGHT_YEAR - if someone finds a portable way to do so then
|
||||
# it might be useful
|
||||
# EXECUTE_PROCESS(COMMAND "date" "/T" OUTPUT_VARIABLE TMP_DATE)
|
||||
# STRING(REGEX REPLACE "(..)/(..)/..(..).*" "\\3\\2\\1" MYSQL_COPYRIGHT_YEAR ${TMP_DATE})
|
||||
|
||||
# Add version information to the exe and dll files
|
||||
# Refer to http://msdn.microsoft.com/en-us/library/aa381058(VS.85).aspx
|
||||
# for more info.
|
||||
IF(MSVC)
|
||||
GET_FILENAME_COMPONENT(MYSQL_CMAKE_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
|
||||
SET(FILETYPE VFT_DLL)
|
||||
CONFIGURE_FILE(${MYSQL_CMAKE_SCRIPT_DIR}/versioninfo.rc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/versioninfo_dll.rc)
|
||||
|
||||
FUNCTION(ADD_VERSION_INFO target sources_var)
|
||||
SET(rcfile ${CMAKE_CURRENT_BINARY_DIR}/versioninfo_dll.rc)
|
||||
SET(${sources_var} ${${sources_var}} ${rcfile} PARENT_SCOPE)
|
||||
ENDFUNCTION()
|
||||
ELSE()
|
||||
FUNCTION(ADD_VERSION_INFO)
|
||||
ENDFUNCTION()
|
||||
ENDIF()
|
||||
142
deps/mysqllite/cmake/os/Windows.cmake
vendored
142
deps/mysqllite/cmake/os/Windows.cmake
vendored
@@ -1,142 +0,0 @@
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# This file includes Windows specific hacks, mostly around compiler flags
|
||||
|
||||
INCLUDE (CheckCSourceCompiles)
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
INCLUDE (CheckStructHasMember)
|
||||
INCLUDE (CheckLibraryExists)
|
||||
INCLUDE (CheckFunctionExists)
|
||||
INCLUDE (CheckCCompilerFlag)
|
||||
INCLUDE (CheckCSourceRuns)
|
||||
INCLUDE (CheckSymbolExists)
|
||||
INCLUDE (CheckTypeSize)
|
||||
|
||||
# avoid running system checks by using pre-cached check results
|
||||
# system checks are expensive on VS since every tiny program is to be compiled in
|
||||
# a VC solution.
|
||||
GET_FILENAME_COMPONENT(_SCRIPT_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
|
||||
INCLUDE(${_SCRIPT_DIR}/WindowsCache.cmake)
|
||||
|
||||
|
||||
# OS display name (version_compile_os etc).
|
||||
# Used by the test suite to ignore bugs on some platforms,
|
||||
IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
|
||||
SET(SYSTEM_TYPE "Win64")
|
||||
ELSE()
|
||||
SET(SYSTEM_TYPE "Win32")
|
||||
ENDIF()
|
||||
|
||||
# Intel compiler is almost Visual C++
|
||||
# (same compile flags etc). Set MSVC flag
|
||||
IF(CMAKE_C_COMPILER MATCHES "icl")
|
||||
SET(MSVC TRUE)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS("-D__WIN__ -D_CRT_SECURE_NO_DEPRECATE")
|
||||
ADD_DEFINITIONS("-D_WIN32_WINNT=0x0501")
|
||||
# Speed up build process excluding unused header files
|
||||
ADD_DEFINITIONS("-DWIN32_LEAN_AND_MEAN")
|
||||
|
||||
# Adjust compiler and linker flags
|
||||
IF(MINGW AND CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
# mininal architecture flags, i486 enables GCC atomics
|
||||
ADD_DEFINITIONS(-march=i486)
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
# Remove support for exceptions
|
||||
FOREACH(flag CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_INIT)
|
||||
STRING(REPLACE "/EHsc" "" "${flag}" "${${flag}}")
|
||||
ENDFOREACH()
|
||||
|
||||
# Fix CMake's predefined huge stack size
|
||||
STRING(REGEX REPLACE "/STACK:([^ ]+)" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
|
||||
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /wd4244 /wd4267 /wd4090")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /we4099 /wd4244 /wd4267")
|
||||
ENDIF()
|
||||
|
||||
# System checks
|
||||
SET(SIGNAL_WITH_VIO_CLOSE 1) # Something that runtime team needs
|
||||
|
||||
# IPv6 constants appeared in Vista SDK first. We need to define them in any case if they are
|
||||
# not in headers, to handle dual mode sockets correctly.
|
||||
CHECK_SYMBOL_EXISTS(IPPROTO_IPV6 "winsock2.h" HAVE_IPPROTO_IPV6)
|
||||
IF(NOT HAVE_IPPROTO_IPV6)
|
||||
SET(HAVE_IPPROTO_IPV6 41)
|
||||
ENDIF()
|
||||
CHECK_SYMBOL_EXISTS(IPV6_V6ONLY "winsock2.h;ws2ipdef.h" HAVE_IPV6_V6ONLY)
|
||||
IF(NOT HAVE_IPV6_V6ONLY)
|
||||
SET(IPV6_V6ONLY 27)
|
||||
ENDIF()
|
||||
|
||||
# Some standard functions exist there under different
|
||||
# names (e.g popen is _popen or strok_r is _strtok_s)
|
||||
# If a replacement function exists, HAVE_FUNCTION is
|
||||
# defined to 1. CMake variable <function_name> will also
|
||||
# be defined to the replacement name.
|
||||
# So for example, CHECK_FUNCTION_REPLACEMENT(popen _popen)
|
||||
# will define HAVE_POPEN to 1 and set variable named popen
|
||||
# to _popen. If the header template, one needs to have
|
||||
# cmakedefine popen @popen@ which will expand to
|
||||
# define popen _popen after CONFIGURE_FILE
|
||||
|
||||
MACRO(CHECK_FUNCTION_REPLACEMENT function replacement)
|
||||
STRING(TOUPPER ${function} function_upper)
|
||||
CHECK_FUNCTION_EXISTS(${function} HAVE_${function_upper})
|
||||
IF(NOT HAVE_${function_upper})
|
||||
CHECK_FUNCTION_EXISTS(${replacement} HAVE_${replacement})
|
||||
IF(HAVE_${replacement})
|
||||
SET(HAVE_${function_upper} 1 )
|
||||
SET(${function} ${replacement})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
MACRO(CHECK_SYMBOL_REPLACEMENT symbol replacement header)
|
||||
STRING(TOUPPER ${symbol} symbol_upper)
|
||||
CHECK_SYMBOL_EXISTS(${symbol} ${header} HAVE_${symbol_upper})
|
||||
IF(NOT HAVE_${symbol_upper})
|
||||
CHECK_SYMBOL_EXISTS(${replacement} ${header} HAVE_${replacement})
|
||||
IF(HAVE_${replacement})
|
||||
SET(HAVE_${symbol_upper} 1)
|
||||
SET(${symbol} ${replacement})
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
CHECK_SYMBOL_REPLACEMENT(S_IROTH _S_IREAD sys/stat.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(S_IFIFO _S_IFIFO sys/stat.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(SIGQUIT SIGTERM signal.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(SIGPIPE SIGINT signal.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(isnan _isnan float.h)
|
||||
CHECK_SYMBOL_REPLACEMENT(finite _finite float.h)
|
||||
CHECK_FUNCTION_REPLACEMENT(popen _popen)
|
||||
CHECK_FUNCTION_REPLACEMENT(pclose _pclose)
|
||||
CHECK_FUNCTION_REPLACEMENT(access _access)
|
||||
CHECK_FUNCTION_REPLACEMENT(strcasecmp _stricmp)
|
||||
CHECK_FUNCTION_REPLACEMENT(strncasecmp _strnicmp)
|
||||
CHECK_FUNCTION_REPLACEMENT(snprintf _snprintf)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtok_r strtok_s)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtoll _strtoi64)
|
||||
CHECK_FUNCTION_REPLACEMENT(strtoull _strtoui64)
|
||||
CHECK_FUNCTION_REPLACEMENT(vsnprintf _vsnprintf)
|
||||
CHECK_TYPE_SIZE(ssize_t SIZE_OF_SSIZE_T)
|
||||
IF(NOT HAVE_SIZE_OF_SSIZE_T)
|
||||
SET(ssize_t SSIZE_T)
|
||||
ENDIF()
|
||||
|
||||
SET(FN_NO_CASE_SENSE 1)
|
||||
356
deps/mysqllite/cmake/os/WindowsCache.cmake
vendored
356
deps/mysqllite/cmake/os/WindowsCache.cmake
vendored
@@ -1,356 +0,0 @@
|
||||
# Copyright (C) 2010 Sun Microsystems, Inc
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; version 2 of the License.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Avoid system checks on Windows by pre-caching results. Most of the system checks
|
||||
# are not relevant for Windows anyway and it takes lot more time to run them,
|
||||
# since CMake to creates a Visual Studio project for each tiny test.
|
||||
# Note that only we cache values on VC++ only, MinGW would give slightly
|
||||
# different results.
|
||||
|
||||
IF(MSVC)
|
||||
SET(HAVE_ACCESS 1 CACHE INTERNAL "")
|
||||
SET(HAVE_AIO_H CACHE INTERNAL "")
|
||||
SET(HAVE_AIO_READ CACHE INTERNAL "")
|
||||
SET(HAVE_ALARM CACHE INTERNAL "")
|
||||
SET(HAVE_ALLOCA_H CACHE INTERNAL "")
|
||||
SET(HAVE_ARPA_INET_H CACHE INTERNAL "")
|
||||
SET(HAVE_ASM_MSR_H CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE_SYMBOLS CACHE INTERNAL "")
|
||||
SET(HAVE_BACKTRACE_SYMBOLS_FD CACHE INTERNAL "")
|
||||
SET(HAVE_BFILL CACHE INTERNAL "")
|
||||
SET(HAVE_BMOVE CACHE INTERNAL "")
|
||||
SET(HAVE_BSD_SIGNALS CACHE INTERNAL "")
|
||||
SET(HAVE_BSEARCH 1 CACHE INTERNAL "")
|
||||
SET(HAVE_BSS_START CACHE INTERNAL "")
|
||||
SET(HAVE_BZERO CACHE INTERNAL "")
|
||||
SET(HAVE_CHOWN CACHE INTERNAL "")
|
||||
SET(HAVE_CLOCK_GETTIME CACHE INTERNAL "")
|
||||
SET(HAVE_COMPRESS CACHE INTERNAL "")
|
||||
SET(HAVE_CRYPT CACHE INTERNAL "")
|
||||
SET(HAVE_CRYPT_H CACHE INTERNAL "")
|
||||
SET(HAVE_CUSERID CACHE INTERNAL "")
|
||||
SET(HAVE_CXX_NEW 1 CACHE INTERNAL "")
|
||||
SET(HAVE_DECL_MADVISE CACHE INTERNAL "")
|
||||
SET(HAVE_DIRECTIO CACHE INTERNAL "")
|
||||
SET(HAVE_DIRENT_H CACHE INTERNAL "")
|
||||
SET(HAVE_DLERROR CACHE INTERNAL "")
|
||||
SET(HAVE_DLFCN_H CACHE INTERNAL "")
|
||||
SET(HAVE_DLOPEN CACHE INTERNAL "")
|
||||
SET(HAVE_DOPRNT CACHE INTERNAL "")
|
||||
SET(HAVE_EXECINFO_H CACHE INTERNAL "")
|
||||
SET(HAVE_FCHMOD CACHE INTERNAL "")
|
||||
SET(HAVE_FCNTL CACHE INTERNAL "")
|
||||
SET(HAVE_FCNTL_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_FCNTL_NONBLOCK CACHE INTERNAL "")
|
||||
SET(HAVE_FCONVERT CACHE INTERNAL "")
|
||||
SET(HAVE_FDATASYNC CACHE INTERNAL "")
|
||||
SET(HAVE_DECL_FDATASYNC CACHE INTERNAL "")
|
||||
SET(HAVE_FENV_H CACHE INTERNAL "")
|
||||
SET(HAVE_FESETROUND CACHE INTERNAL "")
|
||||
SET(HAVE_FGETLN CACHE INTERNAL "")
|
||||
SET(HAVE_FINITE CACHE INTERNAL "")
|
||||
SET(HAVE_FINITE_IN_MATH_H CACHE INTERNAL "")
|
||||
SET(HAVE_FLOATINGPOINT_H CACHE INTERNAL "")
|
||||
SET(HAVE_FLOAT_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_FLOCKFILE CACHE INTERNAL "")
|
||||
SET(HAVE_FNMATCH_H CACHE INTERNAL "")
|
||||
SET(HAVE_FPSETMASK CACHE INTERNAL "")
|
||||
SET(HAVE_FPU_CONTROL_H CACHE INTERNAL "")
|
||||
SET(HAVE_FSEEKO CACHE INTERNAL "")
|
||||
SET(HAVE_FSYNC CACHE INTERNAL "")
|
||||
SET(HAVE_FTIME 1 CACHE INTERNAL "")
|
||||
SET(HAVE_FTRUNCATE CACHE INTERNAL "")
|
||||
SET(HAVE_GETADDRINFO 1 CACHE INTERNAL "")
|
||||
SET(HAVE_GETCWD 1 CACHE INTERNAL "")
|
||||
SET(HAVE_GETHOSTBYADDR_R CACHE INTERNAL "")
|
||||
SET(HAVE_GETHOSTBYNAME_R CACHE INTERNAL "")
|
||||
SET(HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE CACHE INTERNAL "")
|
||||
SET(HAVE_GETHOSTBYNAME_R_RETURN_INT CACHE INTERNAL "")
|
||||
SET(HAVE_GETHRTIME CACHE INTERNAL "")
|
||||
SET(HAVE_GETLINE CACHE INTERNAL "")
|
||||
SET(HAVE_GETNAMEINFO CACHE INTERNAL "")
|
||||
SET(HAVE_GETPAGESIZE CACHE INTERNAL "")
|
||||
SET(HAVE_GETPASS CACHE INTERNAL "")
|
||||
SET(HAVE_GETPASSPHRASE CACHE INTERNAL "")
|
||||
SET(HAVE_GETPWNAM CACHE INTERNAL "")
|
||||
SET(HAVE_GETPWUID CACHE INTERNAL "")
|
||||
SET(HAVE_GETRLIMIT CACHE INTERNAL "")
|
||||
SET(HAVE_GETRUSAGE CACHE INTERNAL "")
|
||||
SET(HAVE_GETTIMEOFDAY CACHE INTERNAL "")
|
||||
SET(HAVE_GETWD CACHE INTERNAL "")
|
||||
SET(HAVE_GMTIME_R CACHE INTERNAL "")
|
||||
SET(HAVE_GRP_H CACHE INTERNAL "")
|
||||
SET(HAVE_IA64INTRIN_H CACHE INTERNAL "")
|
||||
SET(HAVE_IEEEFP_H CACHE INTERNAL "")
|
||||
SET(HAVE_INDEX CACHE INTERNAL "")
|
||||
SET(HAVE_INITGROUPS CACHE INTERNAL "")
|
||||
SET(HAVE_INTTYPES_H CACHE INTERNAL "")
|
||||
SET(HAVE_IPPROTO_IPV6 CACHE INTERNAL "")
|
||||
SET(HAVE_IPV6 TRUE CACHE INTERNAL "")
|
||||
SET(HAVE_IPV6_V6ONLY 1 CACHE INTERNAL "")
|
||||
SET(HAVE_ISINF CACHE INTERNAL "")
|
||||
SET(HAVE_ISNAN CACHE INTERNAL "")
|
||||
SET(HAVE_ISSETUGID CACHE INTERNAL "")
|
||||
SET(HAVE_LANGINFO_H CACHE INTERNAL "")
|
||||
SET(HAVE_LDIV 1 CACHE INTERNAL "")
|
||||
SET(HAVE_LIMITS_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_LOCALE_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_LOCALTIME_R CACHE INTERNAL "")
|
||||
SET(HAVE_LOG2 CACHE INTERNAL "")
|
||||
SET(HAVE_LONGJMP 1 CACHE INTERNAL "")
|
||||
SET(HAVE_LRAND48 CACHE INTERNAL "")
|
||||
SET(HAVE_LSTAT CACHE INTERNAL "")
|
||||
SET(HAVE_MADVISE CACHE INTERNAL "")
|
||||
SET(HAVE_MALLINFO CACHE INTERNAL "")
|
||||
SET(HAVE_MALLOC_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_MEMALIGN CACHE INTERNAL "")
|
||||
SET(HAVE_MEMCPY 1 CACHE INTERNAL "")
|
||||
SET(HAVE_MEMMOVE 1 CACHE INTERNAL "")
|
||||
SET(HAVE_MEMORY_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_MKSTEMP CACHE INTERNAL "")
|
||||
SET(HAVE_MLOCK CACHE INTERNAL "")
|
||||
SET(HAVE_MLOCKALL CACHE INTERNAL "")
|
||||
SET(HAVE_MMAP CACHE INTERNAL "")
|
||||
SET(HAVE_MMAP64 CACHE INTERNAL "")
|
||||
SET(HAVE_NETINET_IN6_H CACHE INTERNAL "")
|
||||
SET(HAVE_NETINET_IN_H CACHE INTERNAL "")
|
||||
SET(HAVE_NL_LANGINFO CACHE INTERNAL "")
|
||||
SET(HAVE_PASE_ENVIRONMENT CACHE INTERNAL "")
|
||||
SET(HAVE_PATHS_H CACHE INTERNAL "")
|
||||
SET(HAVE_PCLOSE CACHE INTERNAL "")
|
||||
SET(HAVE_PERROR 1 CACHE INTERNAL "")
|
||||
SET(HAVE_PEERCRED CACHE INTERNAL "")
|
||||
SET(HAVE_POLL_H CACHE INTERNAL "")
|
||||
SET(HAVE_POPEN CACHE INTERNAL "")
|
||||
SET(HAVE_POLL CACHE INTERNAL "")
|
||||
SET(HAVE_PORT_CREATE CACHE INTERNAL "")
|
||||
SET(HAVE_PORT_H CACHE INTERNAL "")
|
||||
SET(HAVE_POSIX_FALLOCATE CACHE INTERNAL "")
|
||||
SET(HAVE_POSIX_SIGNALS CACHE INTERNAL "")
|
||||
SET(HAVE_PREAD CACHE INTERNAL "")
|
||||
SET(HAVE_PRINTSTACK CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_ATTR_CREATE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_ATTR_GETSTACKSIZE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_ATTR_SETSCOPE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_ATTR_SETSTACKSIZE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_CONDATTR_CREATE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_CONDATTR_SETCLOCK CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_INIT CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_KEY_DELETE CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_RWLOCK_RDLOCK CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_SIGMASK CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_THREADMASK CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_YIELD_NP CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_YIELD_ZERO_ARG CACHE INTERNAL "")
|
||||
SET(HAVE_PUTENV 1 CACHE INTERNAL "")
|
||||
SET(HAVE_PWD_H CACHE INTERNAL "")
|
||||
SET(HAVE_RDTSCLL CACHE INTERNAL "")
|
||||
SET(HAVE_READDIR_R CACHE INTERNAL "")
|
||||
SET(HAVE_READLINK CACHE INTERNAL "")
|
||||
SET(HAVE_READ_REAL_TIME CACHE INTERNAL "")
|
||||
SET(HAVE_REALPATH CACHE INTERNAL "")
|
||||
SET(HAVE_REGCOMP CACHE INTERNAL "")
|
||||
SET(HAVE_RENAME 1 CACHE INTERNAL "")
|
||||
SET(HAVE_RE_COMP CACHE INTERNAL "")
|
||||
SET(HAVE_RINT CACHE INTERNAL "")
|
||||
SET(HAVE_RWLOCK_INIT CACHE INTERNAL "")
|
||||
SET(HAVE_SCHED_H CACHE INTERNAL "")
|
||||
SET(HAVE_SCHED_YIELD CACHE INTERNAL "")
|
||||
SET(HAVE_SELECT 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SELECT_H CACHE INTERNAL "")
|
||||
SET(HAVE_SEMAPHORE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SETENV CACHE INTERNAL "")
|
||||
SET(HAVE_SETFD CACHE INTERNAL "")
|
||||
SET(HAVE_SETLOCALE 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SHMAT CACHE INTERNAL "")
|
||||
SET(HAVE_SHMCTL CACHE INTERNAL "")
|
||||
SET(HAVE_SHMDT CACHE INTERNAL "")
|
||||
SET(HAVE_SHMGET CACHE INTERNAL "")
|
||||
SET(HAVE_SIGACTION CACHE INTERNAL "")
|
||||
SET(HAVE_SIGADDSET CACHE INTERNAL "")
|
||||
SET(HAVE_SIGEMPTYSET CACHE INTERNAL "")
|
||||
SET(HAVE_SIGHOLD CACHE INTERNAL "")
|
||||
SET(HAVE_SIGINT 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SIGPIPE CACHE INTERNAL "")
|
||||
SET(HAVE_SIGQUIT CACHE INTERNAL "")
|
||||
SET(HAVE_SIGSET CACHE INTERNAL "")
|
||||
SET(HAVE_SIGTERM 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SIGTHREADMASK CACHE INTERNAL "")
|
||||
SET(HAVE_SIGWAIT CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_BOOL FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_CHAR TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_CHAR 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_CHARP TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_CHARP ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_IN6_ADDR TRUE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_INT TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_INT 4 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_INT16 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_INT32 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_INT64 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_INT8 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_LONG TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_LONG 4 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_LONG_LONG TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_LONG_LONG 8 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_MODE_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_OFF_T TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_OFF_T 4 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_SHORT TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_SHORT 2 CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_SIGSET_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_SIZE_T TRUE CACHE INTERNAL "")
|
||||
SET(SIZEOF_SIZE_T ${CMAKE_SIZEOF_VOID_P} CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_SOCKADDR_IN6 TRUE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_SOCKLEN_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UCHAR FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UINT FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UINT16 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UINT32 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UINT64 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_UINT8 FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_ULONG FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZEOF_U_INT32_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SIZE_OF_SSIZE_T FALSE CACHE INTERNAL "")
|
||||
SET(HAVE_SLEEP CACHE INTERNAL "")
|
||||
SET(HAVE_SNPRINTF CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_STORAGE_SS_FAMILY 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SOLARIS_STYLE_GETHOST CACHE INTERNAL "")
|
||||
SET(STACK_DIRECTION -1 CACHE INTERNAL "")
|
||||
SET(HAVE_STDARG_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STDDEF_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STDINT_H CACHE INTERNAL "")
|
||||
SET(HAVE_STDLIB_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STPCPY CACHE INTERNAL "")
|
||||
SET(HAVE_STRCASECMP CACHE INTERNAL "")
|
||||
SET(HAVE_STRCOLL 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRDUP 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRERROR 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRINGS_H CACHE INTERNAL "")
|
||||
SET(HAVE_STRING_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRLCAT CACHE INTERNAL "")
|
||||
SET(HAVE_STRLCPY CACHE INTERNAL "")
|
||||
SET(HAVE_STRNCASECMP CACHE INTERNAL "")
|
||||
IF(MSVC_VERSION GREATER 1310)
|
||||
SET(HAVE_STRNLEN 1 CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
SET(HAVE_STRPBRK 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRSEP CACHE INTERNAL "")
|
||||
SET(HAVE_STRSIGNAL CACHE INTERNAL "")
|
||||
SET(HAVE_STRSTR 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRTOK_R CACHE INTERNAL "")
|
||||
SET(HAVE_STRTOL 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRTOLL CACHE INTERNAL "")
|
||||
SET(HAVE_STRTOUL 1 CACHE INTERNAL "")
|
||||
SET(HAVE_STRTOULL CACHE INTERNAL "")
|
||||
SET(HAVE_SVR3_SIGNALS CACHE INTERNAL "")
|
||||
SET(HAVE_SYNCH_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYSENT_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_CDEFS_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_DIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_ERRLIST CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FILE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_FPU_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_IOCTL_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_IPC_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_MALLOC_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_MMAN_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_PARAM_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_PRCTL_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_PTEM_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_PTE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_RESOURCE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_SELECT_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_SHM_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_SOCKET_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_STAT_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_STREAM_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_TERMCAP_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_TIMEB_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_TIMES_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_TIME_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_TYPES_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_UN_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_UTIME_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_VADVISE_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_WAIT_H CACHE INTERNAL "")
|
||||
SET(HAVE_TCGETATTR CACHE INTERNAL "")
|
||||
SET(HAVE_TELL 1 CACHE INTERNAL "")
|
||||
SET(HAVE_TEMPNAM 1 CACHE INTERNAL "")
|
||||
SET(HAVE_TERMCAP_H CACHE INTERNAL "")
|
||||
SET(HAVE_TERMIOS_H CACHE INTERNAL "")
|
||||
SET(HAVE_TERMIO_H CACHE INTERNAL "")
|
||||
SET(HAVE_TERM_H CACHE INTERNAL "")
|
||||
SET(HAVE_THR_SETCONCURRENCY CACHE INTERNAL "")
|
||||
SET(HAVE_THR_YIELD CACHE INTERNAL "")
|
||||
SET(HAVE_TIME 1 CACHE INTERNAL "")
|
||||
SET(HAVE_TIMES CACHE INTERNAL "")
|
||||
SET(HAVE_TIMESPEC_TS_SEC CACHE INTERNAL "")
|
||||
SET(HAVE_TIME_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_TZNAME 1 CACHE INTERNAL "")
|
||||
SET(HAVE_UNISTD_H CACHE INTERNAL "")
|
||||
SET(HAVE_UTIME_H CACHE INTERNAL "")
|
||||
SET(HAVE_VALLOC CACHE INTERNAL "")
|
||||
SET(HAVE_VARARGS_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_VASPRINTF CACHE INTERNAL "")
|
||||
SET(HAVE_VPRINTF 1 CACHE INTERNAL "")
|
||||
IF(MSVC_VERSION GREATER 1310)
|
||||
SET(HAVE_VSNPRINTF 1 CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
SET(HAVE_WEAK_SYMBOL CACHE INTERNAL "")
|
||||
SET(HAVE_WORDS_BIGENDIAN TRUE CACHE INTERNAL "")
|
||||
SET(WORDS_BIGENDIAN CACHE INTERNAL "")
|
||||
SET(HAVE__S_IFIFO 1 CACHE INTERNAL "")
|
||||
SET(HAVE__S_IREAD 1 CACHE INTERNAL "")
|
||||
SET(HAVE__finite 1 CACHE INTERNAL "")
|
||||
SET(HAVE__isnan 1 CACHE INTERNAL "")
|
||||
SET(HAVE__pclose 1 CACHE INTERNAL "")
|
||||
SET(HAVE__popen 1 CACHE INTERNAL "")
|
||||
SET(HAVE__snprintf 1 CACHE INTERNAL "")
|
||||
SET(HAVE__stricmp 1 CACHE INTERNAL "")
|
||||
SET(HAVE__strnicmp 1 CACHE INTERNAL "")
|
||||
SET(HAVE__strtoi64 1 CACHE INTERNAL "")
|
||||
SET(HAVE__strtoui64 1 CACHE INTERNAL "")
|
||||
IF(MSVC_VERSION GREATER 1310)
|
||||
SET(HAVE_strtok_s 1 CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
SET(STDC_HEADERS CACHE 1 INTERNAL "")
|
||||
SET(STRUCT_DIRENT_HAS_D_INO CACHE INTERNAL "")
|
||||
SET(STRUCT_DIRENT_HAS_D_INO CACHE INTERNAL "")
|
||||
SET(STRUCT_DIRENT_HAS_D_NAMLEN CACHE INTERNAL "")
|
||||
SET(TIME_WITH_SYS_TIME CACHE INTERNAL "")
|
||||
SET(TIOCSTAT_IN_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(HAVE_S_IROTH CACHE INTERNAL "")
|
||||
SET(HAVE_S_IFIFO CACHE INTERNAL "")
|
||||
SET(QSORT_TYPE_IS_VOID 1 CACHE INTERNAL "")
|
||||
SET(SIGNAL_RETURN_TYPE_IS_VOID 1 CACHE INTERNAL "")
|
||||
SET(C_HAS_inline CACHE INTERNAL "")
|
||||
SET(C_HAS___inline 1 CACHE INTERNAL "")
|
||||
SET(FIONREAD_IN_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(GWINSZ_IN_SYS_IOCTL CACHE INTERNAL "")
|
||||
SET(HAVE_CXXABI_H CACHE INTERNAL "")
|
||||
SET(HAVE_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_SYS_NDIR_H CACHE INTERNAL "")
|
||||
SET(HAVE_ASM_TERMBITS_H CACHE INTERNAL "")
|
||||
SET(HAVE_TERMBITS_H CACHE INTERNAL "")
|
||||
SET(HAVE_VIS_H CACHE INTERNAL "")
|
||||
SET(HAVE_WCHAR_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_WCTYPE_H 1 CACHE INTERNAL "")
|
||||
SET(HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_IN_SIN_LEN CACHE INTERNAL "")
|
||||
SET(HAVE_SOCKADDR_IN6_SIN6_LEN CACHE INTERNAL "")
|
||||
ENDIF()
|
||||
31
deps/mysqllite/cmake/stack_direction.c
vendored
31
deps/mysqllite/cmake/stack_direction.c
vendored
@@ -1,31 +0,0 @@
|
||||
/* Copyright (C) 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
/* Check stack direction (0-down, 1-up) */
|
||||
int f(int *a)
|
||||
{
|
||||
int b;
|
||||
return(&b > a)?1:0;
|
||||
}
|
||||
/*
|
||||
Prevent compiler optimizations by calling function
|
||||
through pointer.
|
||||
*/
|
||||
volatile int (*ptr_f)(int *) = f;
|
||||
int main()
|
||||
{
|
||||
int a;
|
||||
return ptr_f(&a);
|
||||
}
|
||||
23
deps/mysqllite/cmake/versioninfo.rc.in
vendored
23
deps/mysqllite/cmake/versioninfo.rc.in
vendored
@@ -1,23 +0,0 @@
|
||||
#include <windows.h>
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
|
||||
PRODUCTVERSION @MAJOR_VERSION@,@MINOR_VERSION@,@PATCH_VERSION@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE @FILETYPE@
|
||||
FILESUBTYPE VFT2_UNKNOWN
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "FileVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
|
||||
VALUE "ProductVersion", "@MAJOR_VERSION@.@MINOR_VERSION@.@PATCH_VERSION@.0\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
618
deps/mysqllite/config.h.cmake
vendored
618
deps/mysqllite/config.h.cmake
vendored
@@ -1,618 +0,0 @@
|
||||
/* Copyright (C) 2009, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef MY_CONFIG_H
|
||||
#define MY_CONFIG_H
|
||||
#cmakedefine DOT_FRM_VERSION @DOT_FRM_VERSION@
|
||||
/* Headers we may want to use. */
|
||||
#cmakedefine STDC_HEADERS 1
|
||||
#cmakedefine _GNU_SOURCE 1
|
||||
#cmakedefine HAVE_ALLOCA_H 1
|
||||
#cmakedefine HAVE_AIO_H 1
|
||||
#cmakedefine HAVE_ARPA_INET_H 1
|
||||
#cmakedefine HAVE_ASM_MSR_H 1
|
||||
#cmakedefine HAVE_ASM_TERMBITS_H 1
|
||||
#cmakedefine HAVE_BSEARCH 1
|
||||
#cmakedefine HAVE_CRYPT_H 1
|
||||
#cmakedefine HAVE_CURSES_H 1
|
||||
#cmakedefine HAVE_CXXABI_H 1
|
||||
#cmakedefine HAVE_NCURSES_H 1
|
||||
#cmakedefine HAVE_NDIR_H 1
|
||||
#cmakedefine HAVE_DIRENT_H 1
|
||||
#cmakedefine HAVE_DLFCN_H 1
|
||||
#cmakedefine HAVE_EXECINFO_H 1
|
||||
#cmakedefine HAVE_FCNTL_H 1
|
||||
#cmakedefine HAVE_FENV_H 1
|
||||
#cmakedefine HAVE_FLOAT_H 1
|
||||
#cmakedefine HAVE_FLOATINGPOINT_H 1
|
||||
#cmakedefine HAVE_FNMATCH_H 1
|
||||
#cmakedefine HAVE_FPU_CONTROL_H 1
|
||||
#cmakedefine HAVE_GRP_H 1
|
||||
#cmakedefine HAVE_EXPLICIT_TEMPLATE_INSTANTIATION 1
|
||||
#cmakedefine HAVE_IA64INTRIN_H 1
|
||||
#cmakedefine HAVE_IEEEFP_H 1
|
||||
#cmakedefine HAVE_INTTYPES_H 1
|
||||
#cmakedefine HAVE_LIMITS_H 1
|
||||
#cmakedefine HAVE_LOCALE_H 1
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
#cmakedefine HAVE_MEMORY_H 1
|
||||
#cmakedefine HAVE_NETINET_IN_H 1
|
||||
#cmakedefine HAVE_PATHS_H 1
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
#cmakedefine HAVE_PORT_H 1
|
||||
#cmakedefine HAVE_PWD_H 1
|
||||
#cmakedefine HAVE_SCHED_H 1
|
||||
#cmakedefine HAVE_SELECT_H 1
|
||||
#cmakedefine HAVE_SOLARIS_LARGE_PAGES 1
|
||||
#cmakedefine HAVE_STDDEF_H 1
|
||||
#cmakedefine HAVE_STDLIB_H 1
|
||||
#cmakedefine HAVE_STDARG_H 1
|
||||
#cmakedefine HAVE_STRINGS_H 1
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
#cmakedefine HAVE_STDINT_H 1
|
||||
#cmakedefine HAVE_SEMAPHORE_H 1
|
||||
#cmakedefine HAVE_SYNCH_H 1
|
||||
#cmakedefine HAVE_SYSENT_H 1
|
||||
#cmakedefine HAVE_SYS_DIR_H 1
|
||||
#cmakedefine HAVE_SYS_CDEFS_H 1
|
||||
#cmakedefine HAVE_SYS_FILE_H 1
|
||||
#cmakedefine HAVE_SYS_FPU_H 1
|
||||
#cmakedefine HAVE_SYS_IOCTL_H 1
|
||||
#cmakedefine HAVE_SYS_IPC_H 1
|
||||
#cmakedefine HAVE_SYS_MALLOC_H 1
|
||||
#cmakedefine HAVE_SYS_MMAN_H 1
|
||||
#cmakedefine HAVE_SYS_NDIR_H 1
|
||||
#cmakedefine HAVE_SYS_PTE_H 1
|
||||
#cmakedefine HAVE_SYS_PTEM_H 1
|
||||
#cmakedefine HAVE_SYS_PRCTL_H 1
|
||||
#cmakedefine HAVE_SYS_RESOURCE_H 1
|
||||
#cmakedefine HAVE_SYS_SELECT_H 1
|
||||
#cmakedefine HAVE_SYS_SHM_H 1
|
||||
#cmakedefine HAVE_SYS_SOCKET_H 1
|
||||
#cmakedefine HAVE_SYS_STAT_H 1
|
||||
#cmakedefine HAVE_SYS_STREAM_H 1
|
||||
#cmakedefine HAVE_SYS_TERMCAP_H 1
|
||||
#cmakedefine HAVE_SYS_TIMEB_H 1
|
||||
#cmakedefine HAVE_SYS_TIMES_H 1
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
#cmakedefine HAVE_SYS_TYPES_H 1
|
||||
#cmakedefine HAVE_SYS_UN_H 1
|
||||
#cmakedefine HAVE_SYS_VADVISE_H 1
|
||||
#cmakedefine HAVE_TERM_H 1
|
||||
#cmakedefine HAVE_TERMBITS_H 1
|
||||
#cmakedefine HAVE_TERMIOS_H 1
|
||||
#cmakedefine HAVE_TERMIO_H 1
|
||||
#cmakedefine HAVE_TERMCAP_H 1
|
||||
#cmakedefine HAVE_TIME_H 1
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
#cmakedefine HAVE_UTIME_H 1
|
||||
#cmakedefine HAVE_VARARGS_H 1
|
||||
#cmakedefine HAVE_VIS_H 1
|
||||
#cmakedefine HAVE_SYS_UTIME_H 1
|
||||
#cmakedefine HAVE_SYS_WAIT_H 1
|
||||
#cmakedefine HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Libraries */
|
||||
#cmakedefine HAVE_LIBPTHREAD 1
|
||||
#cmakedefine HAVE_LIBM 1
|
||||
#cmakedefine HAVE_LIBDL 1
|
||||
#cmakedefine HAVE_LIBRT 1
|
||||
#cmakedefine HAVE_LIBSOCKET 1
|
||||
#cmakedefine HAVE_LIBNSL 1
|
||||
#cmakedefine HAVE_LIBCRYPT 1
|
||||
#cmakedefine HAVE_LIBMTMALLOC 1
|
||||
#cmakedefine HAVE_LIBWRAP 1
|
||||
/* Does "struct timespec" have a "sec" and "nsec" field? */
|
||||
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
|
||||
|
||||
/* Readline */
|
||||
#cmakedefine HAVE_HIST_ENTRY 1
|
||||
#cmakedefine USE_LIBEDIT_INTERFACE 1
|
||||
#cmakedefine USE_NEW_READLINE_INTERFACE 1
|
||||
|
||||
#cmakedefine FIONREAD_IN_SYS_IOCTL 1
|
||||
#cmakedefine GWINSZ_IN_SYS_IOCTL 1
|
||||
#cmakedefine TIOCSTAT_IN_SYS_IOCTL 1
|
||||
|
||||
/* Functions we may want to use. */
|
||||
#cmakedefine HAVE_AIOWAIT 1
|
||||
#cmakedefine HAVE_ALARM 1
|
||||
#cmakedefine HAVE_ALLOCA 1
|
||||
#cmakedefine HAVE_BFILL 1
|
||||
#cmakedefine HAVE_BMOVE 1
|
||||
#cmakedefine HAVE_BZERO 1
|
||||
#cmakedefine HAVE_INDEX 1
|
||||
#cmakedefine HAVE_CHOWN 1
|
||||
#cmakedefine HAVE_CLOCK_GETTIME 1
|
||||
#cmakedefine HAVE_CRYPT 1
|
||||
#cmakedefine HAVE_CUSERID 1
|
||||
#cmakedefine HAVE_CXX_NEW 1
|
||||
#cmakedefine HAVE_DIRECTIO 1
|
||||
#cmakedefine HAVE_DLERROR 1
|
||||
#cmakedefine HAVE_DLOPEN 1
|
||||
#cmakedefine HAVE_DOPRNT 1
|
||||
#cmakedefine HAVE_FCHMOD 1
|
||||
#cmakedefine HAVE_FCNTL 1
|
||||
#cmakedefine HAVE_FCONVERT 1
|
||||
#cmakedefine HAVE_FDATASYNC 1
|
||||
#cmakedefine HAVE_FESETROUND 1
|
||||
#cmakedefine HAVE_FINITE 1
|
||||
#cmakedefine HAVE_FP_EXCEPT 1
|
||||
#cmakedefine HAVE_FPSETMASK 1
|
||||
#cmakedefine HAVE_FSEEKO 1
|
||||
#cmakedefine HAVE_FSYNC 1
|
||||
#cmakedefine HAVE_FTIME 1
|
||||
#cmakedefine HAVE_GETADDRINFO 1
|
||||
#cmakedefine HAVE_GETCWD 1
|
||||
#cmakedefine HAVE_GETHOSTBYADDR_R 1
|
||||
#cmakedefine HAVE_GETHOSTBYNAME_R 1
|
||||
#cmakedefine HAVE_GETHRTIME 1
|
||||
#cmakedefine HAVE_GETLINE 1
|
||||
#cmakedefine HAVE_GETNAMEINFO 1
|
||||
#cmakedefine HAVE_GETPAGESIZE 1
|
||||
#cmakedefine HAVE_GETPASS 1
|
||||
#cmakedefine HAVE_GETPASSPHRASE 1
|
||||
#cmakedefine HAVE_GETPWNAM 1
|
||||
#cmakedefine HAVE_GETPWUID 1
|
||||
#cmakedefine HAVE_GETRLIMIT 1
|
||||
#cmakedefine HAVE_GETRUSAGE 1
|
||||
#cmakedefine HAVE_GETTIMEOFDAY 1
|
||||
#cmakedefine HAVE_GETWD 1
|
||||
#cmakedefine HAVE_GMTIME_R 1
|
||||
#cmakedefine gmtime_r @gmtime_r@
|
||||
#cmakedefine HAVE_INITGROUPS 1
|
||||
#cmakedefine HAVE_ISSETUGID 1
|
||||
#cmakedefine HAVE_ISNAN 1
|
||||
#cmakedefine HAVE_ISINF 1
|
||||
#cmakedefine HAVE_LARGE_PAGE_OPTION 1
|
||||
#cmakedefine HAVE_LDIV 1
|
||||
#cmakedefine HAVE_LRAND48 1
|
||||
#cmakedefine HAVE_LOCALTIME_R 1
|
||||
#cmakedefine HAVE_LOG2 1
|
||||
#cmakedefine HAVE_LONGJMP 1
|
||||
#cmakedefine HAVE_LSTAT 1
|
||||
#cmakedefine HAVE_MEMALIGN 1
|
||||
/* #cmakedefine HAVE_MLOCK 1 see Bug#54662 */
|
||||
#cmakedefine HAVE_NPTL 1
|
||||
#cmakedefine HAVE_NL_LANGINFO 1
|
||||
#cmakedefine HAVE_MADVISE 1
|
||||
#cmakedefine HAVE_DECL_MADVISE 1
|
||||
#cmakedefine HAVE_DECL_TGOTO 1
|
||||
#cmakedefine HAVE_DECL_MHA_MAPSIZE_VA
|
||||
#cmakedefine HAVE_MALLINFO 1
|
||||
#cmakedefine HAVE_MEMCPY 1
|
||||
#cmakedefine HAVE_MEMMOVE 1
|
||||
#cmakedefine HAVE_MKSTEMP 1
|
||||
#cmakedefine HAVE_MLOCKALL 1
|
||||
#cmakedefine HAVE_MMAP 1
|
||||
#cmakedefine HAVE_MMAP64 1
|
||||
#cmakedefine HAVE_PERROR 1
|
||||
#cmakedefine HAVE_POLL 1
|
||||
#cmakedefine HAVE_PORT_CREATE 1
|
||||
#cmakedefine HAVE_POSIX_FALLOCATE 1
|
||||
#cmakedefine HAVE_PREAD 1
|
||||
#cmakedefine HAVE_PAUSE_INSTRUCTION 1
|
||||
#cmakedefine HAVE_FAKE_PAUSE_INSTRUCTION 1
|
||||
#cmakedefine HAVE_RDTSCLL 1
|
||||
#cmakedefine HAVE_READ_REAL_TIME 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_CREATE 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_GETSTACKSIZE 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETPRIO 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETSCHEDPARAM 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETSCOPE 1
|
||||
#cmakedefine HAVE_PTHREAD_ATTR_SETSTACKSIZE 1
|
||||
#cmakedefine HAVE_PTHREAD_CONDATTR_CREATE 1
|
||||
#cmakedefine HAVE_PTHREAD_CONDATTR_SETCLOCK 1
|
||||
#cmakedefine HAVE_PTHREAD_INIT 1
|
||||
#cmakedefine HAVE_PTHREAD_KEY_DELETE 1
|
||||
#cmakedefine HAVE_PTHREAD_KEY_DELETE 1
|
||||
#cmakedefine HAVE_PTHREAD_KILL 1
|
||||
#cmakedefine HAVE_PTHREAD_RWLOCK_RDLOCK 1
|
||||
#cmakedefine HAVE_PTHREAD_SETPRIO_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_SETSCHEDPARAM 1
|
||||
#cmakedefine HAVE_PTHREAD_SIGMASK 1
|
||||
#cmakedefine HAVE_PTHREAD_THREADMASK 1
|
||||
#cmakedefine HAVE_PTHREAD_YIELD_NP 1
|
||||
#cmakedefine HAVE_PTHREAD_YIELD_ZERO_ARG 1
|
||||
#cmakedefine PTHREAD_ONCE_INITIALIZER @PTHREAD_ONCE_INITIALIZER@
|
||||
#cmakedefine HAVE_PUTENV 1
|
||||
#cmakedefine HAVE_RE_COMP 1
|
||||
#cmakedefine HAVE_REGCOMP 1
|
||||
#cmakedefine HAVE_READDIR_R 1
|
||||
#cmakedefine HAVE_READLINK 1
|
||||
#cmakedefine HAVE_REALPATH 1
|
||||
#cmakedefine HAVE_RENAME 1
|
||||
#cmakedefine HAVE_RINT 1
|
||||
#cmakedefine HAVE_RWLOCK_INIT 1
|
||||
#cmakedefine HAVE_SCHED_YIELD 1
|
||||
#cmakedefine HAVE_SELECT 1
|
||||
#cmakedefine HAVE_SETFD 1
|
||||
#cmakedefine HAVE_SETENV 1
|
||||
#cmakedefine HAVE_SETLOCALE 1
|
||||
#cmakedefine HAVE_SIGADDSET 1
|
||||
#cmakedefine HAVE_SIGEMPTYSET 1
|
||||
#cmakedefine HAVE_SIGHOLD 1
|
||||
#cmakedefine HAVE_SIGSET 1
|
||||
#cmakedefine HAVE_SIGSET_T 1
|
||||
#cmakedefine HAVE_SIGACTION 1
|
||||
#cmakedefine HAVE_SIGTHREADMASK 1
|
||||
#cmakedefine HAVE_SIGWAIT 1
|
||||
#cmakedefine HAVE_SLEEP 1
|
||||
#cmakedefine HAVE_SNPRINTF 1
|
||||
#cmakedefine HAVE_STPCPY 1
|
||||
#cmakedefine HAVE_STRERROR 1
|
||||
#cmakedefine HAVE_STRCOLL 1
|
||||
#cmakedefine HAVE_STRSIGNAL 1
|
||||
#cmakedefine HAVE_STRLCPY 1
|
||||
#cmakedefine HAVE_STRLCAT 1
|
||||
#cmakedefine HAVE_FGETLN 1
|
||||
#cmakedefine HAVE_STRNLEN 1
|
||||
#cmakedefine HAVE_STRPBRK 1
|
||||
#cmakedefine HAVE_STRSEP 1
|
||||
#cmakedefine HAVE_STRSTR 1
|
||||
#cmakedefine HAVE_STRTOK_R 1
|
||||
#cmakedefine HAVE_STRTOL 1
|
||||
#cmakedefine HAVE_STRTOLL 1
|
||||
#cmakedefine HAVE_STRTOUL 1
|
||||
#cmakedefine HAVE_STRTOULL 1
|
||||
#cmakedefine HAVE_SHMAT 1
|
||||
#cmakedefine HAVE_SHMCTL 1
|
||||
#cmakedefine HAVE_SHMDT 1
|
||||
#cmakedefine HAVE_SHMGET 1
|
||||
#cmakedefine HAVE_TELL 1
|
||||
#cmakedefine HAVE_TEMPNAM 1
|
||||
#cmakedefine HAVE_THR_SETCONCURRENCY 1
|
||||
#cmakedefine HAVE_THR_YIELD 1
|
||||
#cmakedefine HAVE_TIME 1
|
||||
#cmakedefine HAVE_TIMES 1
|
||||
#cmakedefine HAVE_VALLOC 1
|
||||
#define HAVE_VIO_READ_BUFF 1
|
||||
#cmakedefine HAVE_VASPRINTF 1
|
||||
#cmakedefine HAVE_VPRINTF 1
|
||||
#cmakedefine HAVE_VSNPRINTF 1
|
||||
#cmakedefine HAVE_FTRUNCATE 1
|
||||
#cmakedefine HAVE_TZNAME 1
|
||||
#cmakedefine HAVE_AIO_READ 1
|
||||
/* Symbols we may use */
|
||||
#cmakedefine HAVE_SYS_ERRLIST 1
|
||||
/* used by stacktrace functions */
|
||||
#cmakedefine HAVE_BSS_START 1
|
||||
#cmakedefine HAVE_BACKTRACE 1
|
||||
#cmakedefine HAVE_BACKTRACE_SYMBOLS 1
|
||||
#cmakedefine HAVE_BACKTRACE_SYMBOLS_FD 1
|
||||
#cmakedefine HAVE_PRINTSTACK 1
|
||||
#cmakedefine HAVE_STRUCT_SOCKADDR_IN6 1
|
||||
#cmakedefine HAVE_STRUCT_IN6_ADDR 1
|
||||
#cmakedefine HAVE_NETINET_IN6_H 1
|
||||
#cmakedefine HAVE_IPV6 1
|
||||
#cmakedefine ss_family @ss_family@
|
||||
#cmakedefine HAVE_SOCKADDR_IN_SIN_LEN 1
|
||||
#cmakedefine HAVE_SOCKADDR_IN6_SIN6_LEN 1
|
||||
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_INO 1
|
||||
#cmakedefine STRUCT_DIRENT_HAS_D_NAMLEN 1
|
||||
#cmakedefine SPRINTF_RETURNS_INT 1
|
||||
|
||||
#define USE_MB 1
|
||||
#define USE_MB_IDENT 1
|
||||
|
||||
#cmakedefine HAVE_VALGRIND
|
||||
|
||||
/* Types we may use */
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
Special handling required for OSX to support universal binaries that
|
||||
mix 32 and 64 bit architectures.
|
||||
*/
|
||||
#if(__LP64__)
|
||||
#define SIZEOF_LONG 8
|
||||
#else
|
||||
#define SIZEOF_LONG 4
|
||||
#endif
|
||||
#define SIZEOF_VOIDP SIZEOF_LONG
|
||||
#define SIZEOF_CHARP SIZEOF_LONG
|
||||
#define SIZEOF_SIZE_T SIZEOF_LONG
|
||||
#else
|
||||
/* No indentation, to fetch the lines from verification scripts */
|
||||
#cmakedefine SIZEOF_LONG @SIZEOF_LONG@
|
||||
#cmakedefine SIZEOF_VOIDP @SIZEOF_VOIDP@
|
||||
#cmakedefine SIZEOF_CHARP @SIZEOF_CHARP@
|
||||
#cmakedefine SIZEOF_SIZE_T @SIZEOF_CHARP@
|
||||
#endif
|
||||
|
||||
#cmakedefine SIZEOF_CHAR @SIZEOF_CHAR@
|
||||
#define HAVE_CHAR 1
|
||||
#define HAVE_LONG 1
|
||||
#define HAVE_CHARP 1
|
||||
#cmakedefine SIZEOF_SHORT @SIZEOF_SHORT@
|
||||
#define HAVE_SHORT 1
|
||||
#cmakedefine SIZEOF_INT @SIZEOF_INT@
|
||||
#define HAVE_INT 1
|
||||
#cmakedefine SIZEOF_LONG_LONG @SIZEOF_LONG_LONG@
|
||||
#cmakedefine HAVE_LONG_LONG 1
|
||||
#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@
|
||||
#cmakedefine HAVE_OFF_T 1
|
||||
#cmakedefine SIZEOF_SIGSET_T @SIZEOF_SIGSET_T@
|
||||
#cmakedefine HAVE_SIGSET_T 1
|
||||
#cmakedefine HAVE_SIZE_T 1
|
||||
#cmakedefine SIZEOF_UCHAR @SIZEOF_UCHAR@
|
||||
#cmakedefine HAVE_UCHAR 1
|
||||
#cmakedefine SIZEOF_UINT @SIZEOF_UINT@
|
||||
#cmakedefine HAVE_UINT 1
|
||||
#cmakedefine SIZEOF_ULONG @SIZEOF_ULONG@
|
||||
#cmakedefine HAVE_ULONG 1
|
||||
#cmakedefine SIZEOF_INT8 @SIZEOF_INT8@
|
||||
#cmakedefine HAVE_INT8 1
|
||||
#cmakedefine SIZEOF_UINT8 @SIZEOF_UINT8@
|
||||
#cmakedefine HAVE_UINT8 1
|
||||
#cmakedefine SIZEOF_INT16 @SIZEOF_INT16@
|
||||
#cmakedefine HAVE_INT16 1
|
||||
#cmakedefine SIZEOF_UINT16 @SIZEOF_UINT16@
|
||||
#cmakedefine HAVE_UINT16 1
|
||||
#cmakedefine SIZEOF_INT32 @SIZEOF_INT32@
|
||||
#cmakedefine HAVE_INT32 1
|
||||
#cmakedefine SIZEOF_UINT32 @SIZEOF_UINT32@
|
||||
#cmakedefine HAVE_UINT32 1
|
||||
#cmakedefine SIZEOF_U_INT32_T @SIZEOF_U_INT32_T@
|
||||
#cmakedefine HAVE_U_INT32_T 1
|
||||
#cmakedefine SIZEOF_INT64 @SIZEOF_INT64@
|
||||
#cmakedefine HAVE_INT64 1
|
||||
#cmakedefine SIZEOF_UINT64 @SIZEOF_UINT64@
|
||||
#cmakedefine HAVE_UINT64 1
|
||||
#cmakedefine SIZEOF_BOOL @SIZEOF_BOOL@
|
||||
#cmakedefine HAVE_BOOL 1
|
||||
|
||||
#cmakedefine SOCKET_SIZE_TYPE @SOCKET_SIZE_TYPE@
|
||||
|
||||
#cmakedefine HAVE_MBSTATE_T
|
||||
|
||||
#define MAX_INDEXES 64
|
||||
|
||||
#cmakedefine QSORT_TYPE_IS_VOID 1
|
||||
#cmakedefine RETQSORTTYPE @RETQSORTTYPE@
|
||||
|
||||
#cmakedefine SIGNAL_RETURN_TYPE_IS_VOID 1
|
||||
#cmakedefine RETSIGTYPE @RETSIGTYPE@
|
||||
#cmakedefine VOID_SIGHANDLER 1
|
||||
#define STRUCT_RLIMIT struct rlimit
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if __BIG_ENDIAN
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
#else
|
||||
#cmakedefine WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler calls
|
||||
it, or to nothing if 'inline' is not supported under any name. */
|
||||
#cmakedefine C_HAS_inline 1
|
||||
#if !(C_HAS_inline)
|
||||
#ifndef __cplusplus
|
||||
# define inline @C_INLINE@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#cmakedefine TARGET_OS_LINUX 1
|
||||
|
||||
#cmakedefine HAVE_WCTYPE_H 1
|
||||
#cmakedefine HAVE_WCHAR_H 1
|
||||
#cmakedefine HAVE_LANGINFO_H 1
|
||||
#cmakedefine HAVE_MBRLEN
|
||||
#cmakedefine HAVE_MBSCMP
|
||||
#cmakedefine HAVE_MBSRTOWCS
|
||||
#cmakedefine HAVE_WCRTOMB
|
||||
#cmakedefine HAVE_MBRTOWC
|
||||
#cmakedefine HAVE_WCSCOLL
|
||||
#cmakedefine HAVE_WCSDUP
|
||||
#cmakedefine HAVE_WCWIDTH
|
||||
#cmakedefine HAVE_WCTYPE
|
||||
#cmakedefine HAVE_ISWLOWER 1
|
||||
#cmakedefine HAVE_ISWUPPER 1
|
||||
#cmakedefine HAVE_TOWLOWER 1
|
||||
#cmakedefine HAVE_TOWUPPER 1
|
||||
#cmakedefine HAVE_ISWCTYPE 1
|
||||
#cmakedefine HAVE_WCHAR_T 1
|
||||
#cmakedefine HAVE_WCTYPE_T 1
|
||||
#cmakedefine HAVE_WINT_T 1
|
||||
|
||||
|
||||
#cmakedefine HAVE_STRCASECMP 1
|
||||
#cmakedefine HAVE_STRNCASECMP 1
|
||||
#cmakedefine HAVE_STRDUP 1
|
||||
#cmakedefine HAVE_LANGINFO_CODESET
|
||||
#cmakedefine HAVE_TCGETATTR 1
|
||||
#cmakedefine HAVE_FLOCKFILE 1
|
||||
|
||||
#cmakedefine HAVE_WEAK_SYMBOL 1
|
||||
#cmakedefine HAVE_ABI_CXA_DEMANGLE 1
|
||||
|
||||
|
||||
#cmakedefine HAVE_POSIX_SIGNALS 1
|
||||
#cmakedefine HAVE_BSD_SIGNALS 1
|
||||
#cmakedefine HAVE_SVR3_SIGNALS 1
|
||||
#cmakedefine HAVE_V7_SIGNALS 1
|
||||
|
||||
|
||||
#cmakedefine HAVE_SOLARIS_STYLE_GETHOST 1
|
||||
#cmakedefine HAVE_GETHOSTBYNAME_R_GLIBC2_STYLE 1
|
||||
#cmakedefine HAVE_GETHOSTBYNAME_R_RETURN_INT 1
|
||||
|
||||
#cmakedefine MY_ATOMIC_MODE_DUMMY 1
|
||||
#cmakedefine MY_ATOMIC_MODE_RWLOCKS 1
|
||||
#cmakedefine HAVE_GCC_ATOMIC_BUILTINS 1
|
||||
#cmakedefine HAVE_SOLARIS_ATOMIC 1
|
||||
#cmakedefine HAVE_DECL_SHM_HUGETLB 1
|
||||
#cmakedefine HAVE_LARGE_PAGES 1
|
||||
#cmakedefine HUGETLB_USE_PROC_MEMINFO 1
|
||||
#cmakedefine NO_FCNTL_NONBLOCK 1
|
||||
#cmakedefine NO_ALARM 1
|
||||
|
||||
#cmakedefine _LARGE_FILES 1
|
||||
#cmakedefine _LARGEFILE_SOURCE 1
|
||||
#cmakedefine _LARGEFILE64_SOURCE 1
|
||||
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
|
||||
|
||||
#cmakedefine TIME_WITH_SYS_TIME 1
|
||||
|
||||
#cmakedefine STACK_DIRECTION @STACK_DIRECTION@
|
||||
|
||||
#define SYSTEM_TYPE "@SYSTEM_TYPE@"
|
||||
#define MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
|
||||
#cmakedefine HAVE_DTRACE 1
|
||||
|
||||
#cmakedefine SIGNAL_WITH_VIO_CLOSE 1
|
||||
|
||||
/* Windows stuff, mostly functions, that have Posix analogs but named differently */
|
||||
#cmakedefine S_IROTH @S_IROTH@
|
||||
#cmakedefine S_IFIFO @S_IFIFO@
|
||||
#cmakedefine IPPROTO_IPV6 @IPPROTO_IPV6@
|
||||
#cmakedefine IPV6_V6ONLY @IPV6_V6ONLY@
|
||||
#cmakedefine sigset_t @sigset_t@
|
||||
#cmakedefine mode_t @mode_t@
|
||||
#cmakedefine SIGQUIT @SIGQUIT@
|
||||
#cmakedefine SIGPIPE @SIGPIPE@
|
||||
#cmakedefine isnan @isnan@
|
||||
#cmakedefine finite @finite@
|
||||
#cmakedefine popen @popen@
|
||||
#cmakedefine pclose @pclose@
|
||||
#cmakedefine ssize_t @ssize_t@
|
||||
#cmakedefine strcasecmp @strcasecmp@
|
||||
#cmakedefine strncasecmp @strncasecmp@
|
||||
#cmakedefine snprintf @snprintf@
|
||||
#cmakedefine strtok_r @strtok_r@
|
||||
#cmakedefine strtoll @strtoll@
|
||||
#cmakedefine strtoull @strtoull@
|
||||
#cmakedefine vsnprintf @vsnprintf@
|
||||
#if (_MSC_VER > 1310)
|
||||
# define HAVE_SETENV
|
||||
#define setenv(a,b,c) _putenv_s(a,b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
MySQL features
|
||||
*/
|
||||
#cmakedefine ENABLED_LOCAL_INFILE 1
|
||||
#cmakedefine ENABLED_PROFILING 1
|
||||
#cmakedefine EXTRA_DEBUG 1
|
||||
#cmakedefine BACKUP_TEST 1
|
||||
#cmakedefine CYBOZU 1
|
||||
|
||||
/* Character sets and collations */
|
||||
#cmakedefine MYSQL_DEFAULT_CHARSET_NAME "latin1"
|
||||
#cmakedefine MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
|
||||
|
||||
#cmakedefine USE_MB 1
|
||||
#cmakedefine USE_MB_IDENT 1
|
||||
#cmakedefine USE_STRCOLL 1
|
||||
|
||||
/* This should mean case insensitive file system */
|
||||
#cmakedefine FN_NO_CASE_SENSE 1
|
||||
|
||||
#cmakedefine HAVE_CHARSET_armscii8 1
|
||||
#cmakedefine HAVE_CHARSET_ascii 1
|
||||
#cmakedefine HAVE_CHARSET_big5 1
|
||||
#cmakedefine HAVE_CHARSET_cp1250 1
|
||||
#cmakedefine HAVE_CHARSET_cp1251 1
|
||||
#cmakedefine HAVE_CHARSET_cp1256 1
|
||||
#cmakedefine HAVE_CHARSET_cp1257 1
|
||||
#cmakedefine HAVE_CHARSET_cp850 1
|
||||
#cmakedefine HAVE_CHARSET_cp852 1
|
||||
#cmakedefine HAVE_CHARSET_cp866 1
|
||||
#cmakedefine HAVE_CHARSET_cp932 1
|
||||
#cmakedefine HAVE_CHARSET_dec8 1
|
||||
#cmakedefine HAVE_CHARSET_eucjpms 1
|
||||
#cmakedefine HAVE_CHARSET_euckr 1
|
||||
#cmakedefine HAVE_CHARSET_gb2312 1
|
||||
#cmakedefine HAVE_CHARSET_gbk 1
|
||||
#cmakedefine HAVE_CHARSET_geostd8 1
|
||||
#cmakedefine HAVE_CHARSET_greek 1
|
||||
#cmakedefine HAVE_CHARSET_hebrew 1
|
||||
#cmakedefine HAVE_CHARSET_hp8 1
|
||||
#cmakedefine HAVE_CHARSET_keybcs2 1
|
||||
#cmakedefine HAVE_CHARSET_koi8r 1
|
||||
#cmakedefine HAVE_CHARSET_koi8u 1
|
||||
#cmakedefine HAVE_CHARSET_latin1 1
|
||||
#cmakedefine HAVE_CHARSET_latin2 1
|
||||
#cmakedefine HAVE_CHARSET_latin5 1
|
||||
#cmakedefine HAVE_CHARSET_latin7 1
|
||||
#cmakedefine HAVE_CHARSET_macce 1
|
||||
#cmakedefine HAVE_CHARSET_macroman 1
|
||||
#cmakedefine HAVE_CHARSET_sjis 1
|
||||
#cmakedefine HAVE_CHARSET_swe7 1
|
||||
#cmakedefine HAVE_CHARSET_tis620 1
|
||||
#cmakedefine HAVE_CHARSET_ucs2 1
|
||||
#cmakedefine HAVE_CHARSET_ujis 1
|
||||
#cmakedefine HAVE_CHARSET_utf8mb4 1
|
||||
#cmakedefine HAVE_CHARSET_utf8mb3 1
|
||||
#cmakedefine HAVE_CHARSET_utf8 1
|
||||
#cmakedefine HAVE_CHARSET_utf16 1
|
||||
#cmakedefine HAVE_CHARSET_utf32 1
|
||||
#cmakedefine HAVE_UCA_COLLATIONS 1
|
||||
#cmakedefine HAVE_COMPRESS 1
|
||||
|
||||
|
||||
/*
|
||||
Stuff that always need to be defined (compile breaks without it)
|
||||
*/
|
||||
#define HAVE_SPATIAL 1
|
||||
#define HAVE_RTREE_KEYS 1
|
||||
#define HAVE_QUERY_CACHE 1
|
||||
#define BIG_TABLES 1
|
||||
|
||||
/*
|
||||
Important storage engines (those that really need define
|
||||
WITH_<ENGINE>_STORAGE_ENGINE for the whole server)
|
||||
*/
|
||||
#cmakedefine WITH_MYISAM_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_MYISAMMRG_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_HEAP_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_CSV_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_PARTITION_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_PERFSCHEMA_STORAGE_ENGINE 1
|
||||
#cmakedefine WITH_NDBCLUSTER_STORAGE_ENGINE 1
|
||||
#if (WITH_NDBCLUSTER_STORAGE_ENGINE) && !defined(EMBEDDED_LIBRARY)
|
||||
# define HAVE_NDB_BINLOG 1
|
||||
#endif
|
||||
|
||||
#cmakedefine DEFAULT_MYSQL_HOME "@DEFAULT_MYSQL_HOME@"
|
||||
#cmakedefine SHAREDIR "@SHAREDIR@"
|
||||
#cmakedefine DEFAULT_BASEDIR "@DEFAULT_BASEDIR@"
|
||||
#cmakedefine MYSQL_DATADIR "@MYSQL_DATADIR@"
|
||||
#cmakedefine DEFAULT_CHARSET_HOME "@DEFAULT_CHARSET_HOME@"
|
||||
#cmakedefine PLUGINDIR "@PLUGINDIR@"
|
||||
#cmakedefine DEFAULT_SYSCONFDIR "@DEFAULT_SYSCONFDIR@"
|
||||
|
||||
#cmakedefine SO_EXT "@CMAKE_SHARED_MODULE_SUFFIX@"
|
||||
|
||||
#define MYSQL_MAJOR_VERSION @MAJOR_VERSION@
|
||||
#define MYSQL_MINOR_VERSION @MINOR_VERSION@
|
||||
|
||||
#define PACKAGE "mysql"
|
||||
#define PACKAGE_BUGREPORT ""
|
||||
#define PACKAGE_NAME "MySQL Server"
|
||||
#define PACKAGE_STRING "MySQL Server @VERSION@"
|
||||
#define PACKAGE_TARNAME "mysql"
|
||||
#define PACKAGE_VERSION "@VERSION@"
|
||||
#define VERSION "@VERSION@"
|
||||
#define PROTOCOL_VERSION 10
|
||||
|
||||
|
||||
#endif
|
||||
1101
deps/mysqllite/configure.cmake
vendored
1101
deps/mysqllite/configure.cmake
vendored
File diff suppressed because it is too large
Load Diff
2284
deps/mysqllite/dbug/dbug.c
vendored
2284
deps/mysqllite/dbug/dbug.c
vendored
File diff suppressed because it is too large
Load Diff
160
deps/mysqllite/dbug/dbug_long.h
vendored
160
deps/mysqllite/dbug/dbug_long.h
vendored
@@ -1,160 +0,0 @@
|
||||
#error This file is not used in MySQL - see ../include/my_dbug.h instead
|
||||
/******************************************************************************
|
||||
* *
|
||||
* N O T I C E *
|
||||
* *
|
||||
* Copyright Abandoned, 1987, Fred Fish *
|
||||
* *
|
||||
* *
|
||||
* This previously copyrighted work has been placed into the public *
|
||||
* domain by the author and may be freely used for any purpose, *
|
||||
* private or commercial. *
|
||||
* *
|
||||
* Because of the number of inquiries I was receiving about the use *
|
||||
* of this product in commercially developed works I have decided to *
|
||||
* simply make it public domain to further its unrestricted use. I *
|
||||
* specifically would be most happy to see this material become a *
|
||||
* part of the standard Unix distributions by AT&T and the Berkeley *
|
||||
* Computer Science Research Group, and a standard part of the GNU *
|
||||
* system from the Free Software Foundation. *
|
||||
* *
|
||||
* I would appreciate it, as a courtesy, if this notice is left in *
|
||||
* all copies and derivative works. Thank you. *
|
||||
* *
|
||||
* The author makes no warranty of any kind with respect to this *
|
||||
* product and explicitly disclaims any implied warranties of mer- *
|
||||
* chantability or fitness for any particular purpose. *
|
||||
* *
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
* FILE
|
||||
*
|
||||
* dbug.h user include file for programs using the dbug package
|
||||
*
|
||||
* SYNOPSIS
|
||||
*
|
||||
* #include <local/dbug.h>
|
||||
*
|
||||
* SCCS ID
|
||||
*
|
||||
* @(#)dbug.h 1.13 7/17/89
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Programs which use the dbug package must include this file.
|
||||
* It contains the appropriate macros to call support routines
|
||||
* in the dbug runtime library.
|
||||
*
|
||||
* To disable compilation of the macro expansions define the
|
||||
* preprocessor symbol "DBUG_OFF". This will result in null
|
||||
* macros expansions so that the resulting code will be smaller
|
||||
* and faster. (The difference may be smaller than you think
|
||||
* so this step is recommended only when absolutely necessary).
|
||||
* In general, tradeoffs between space and efficiency are
|
||||
* decided in favor of efficiency since space is seldom a
|
||||
* problem on the new machines).
|
||||
*
|
||||
* All externally visible symbol names follow the pattern
|
||||
* "_db_xxx..xx_" to minimize the possibility of a dbug package
|
||||
* symbol colliding with a user defined symbol.
|
||||
*
|
||||
* The DBUG_<N> style macros are obsolete and should not be used
|
||||
* in new code. Macros to map them to instances of DBUG_PRINT
|
||||
* are provided for compatibility with older code. They may go
|
||||
* away completely in subsequent releases.
|
||||
*
|
||||
* AUTHOR
|
||||
*
|
||||
* Fred Fish
|
||||
* (Currently employed by Motorola Computer Division, Tempe, Az.)
|
||||
* hao!noao!mcdsun!fnf
|
||||
* (602) 438-3614
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Internally used dbug variables which must be global.
|
||||
*/
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
extern int _db_on_; /* TRUE if debug currently enabled */
|
||||
extern FILE *_db_fp_; /* Current debug output stream */
|
||||
extern char *_db_process_; /* Name of current process */
|
||||
extern int _db_keyword_ (); /* Accept/reject keyword */
|
||||
extern void _db_push_ (); /* Push state, set up new state */
|
||||
extern void _db_pop_ (); /* Pop previous debug state */
|
||||
extern void _db_enter_ (); /* New user function entered */
|
||||
extern void _db_return_ (); /* User function return */
|
||||
extern void _db_pargs_ (); /* Remember args for line */
|
||||
extern void _db_doprnt_ (); /* Print debug output */
|
||||
extern void _db_setjmp_ (); /* Save debugger environment */
|
||||
extern void _db_longjmp_ (); /* Restore debugger environment */
|
||||
extern void _db_dump_(); /* Dump memory */
|
||||
# endif
|
||||
|
||||
|
||||
/*
|
||||
* These macros provide a user interface into functions in the
|
||||
* dbug runtime support library. They isolate users from changes
|
||||
* in the MACROS and/or runtime support.
|
||||
*
|
||||
* The symbols "__LINE__" and "__FILE__" are expanded by the
|
||||
* preprocessor to the current source file line number and file
|
||||
* name respectively.
|
||||
*
|
||||
* WARNING --- Because the DBUG_ENTER macro allocates space on
|
||||
* the user function's stack, it must precede any executable
|
||||
* statements in the user function.
|
||||
*
|
||||
*/
|
||||
|
||||
# ifdef DBUG_OFF
|
||||
# define DBUG_ENTER(a1)
|
||||
# define DBUG_RETURN(a1) return(a1)
|
||||
# define DBUG_VOID_RETURN return
|
||||
# define DBUG_EXECUTE(keyword,a1)
|
||||
# define DBUG_PRINT(keyword,arglist)
|
||||
# define DBUG_2(keyword,format) /* Obsolete */
|
||||
# define DBUG_3(keyword,format,a1) /* Obsolete */
|
||||
# define DBUG_4(keyword,format,a1,a2) /* Obsolete */
|
||||
# define DBUG_5(keyword,format,a1,a2,a3) /* Obsolete */
|
||||
# define DBUG_PUSH(a1)
|
||||
# define DBUG_POP()
|
||||
# define DBUG_PROCESS(a1)
|
||||
# define DBUG_FILE (stderr)
|
||||
# define DBUG_SETJMP setjmp
|
||||
# define DBUG_LONGJMP longjmp
|
||||
# define DBUG_DUMP(keyword,a1)
|
||||
# else
|
||||
# define DBUG_ENTER(a) \
|
||||
auto char *_db_func_; auto char *_db_file_; auto int _db_level_; \
|
||||
auto char **_db_framep_; \
|
||||
_db_enter_ (a,__FILE__,__LINE__,&_db_func_,&_db_file_,&_db_level_, \
|
||||
&_db_framep_)
|
||||
# define DBUG_LEAVE \
|
||||
(_db_return_ (__LINE__, &_db_func_, &_db_file_, &_db_level_))
|
||||
# define DBUG_RETURN(a1) return (DBUG_LEAVE, (a1))
|
||||
/* define DBUG_RETURN(a1) {DBUG_LEAVE; return(a1);} Alternate form */
|
||||
# define DBUG_VOID_RETURN {DBUG_LEAVE; return;}
|
||||
# define DBUG_EXECUTE(keyword,a1) \
|
||||
{if (_db_on_) {if (_db_keyword_ (keyword)) { a1 }}}
|
||||
# define DBUG_PRINT(keyword,arglist) \
|
||||
{if (_db_on_) {_db_pargs_(__LINE__,keyword); _db_doprnt_ arglist;}}
|
||||
# define DBUG_2(keyword,format) \
|
||||
DBUG_PRINT(keyword,(format)) /* Obsolete */
|
||||
# define DBUG_3(keyword,format,a1) \
|
||||
DBUG_PRINT(keyword,(format,a1)) /* Obsolete */
|
||||
# define DBUG_4(keyword,format,a1,a2) \
|
||||
DBUG_PRINT(keyword,(format,a1,a2)) /* Obsolete */
|
||||
# define DBUG_5(keyword,format,a1,a2,a3) \
|
||||
DBUG_PRINT(keyword,(format,a1,a2,a3)) /* Obsolete */
|
||||
# define DBUG_PUSH(a1) _db_push_ (a1)
|
||||
# define DBUG_POP() _db_pop_ ()
|
||||
# define DBUG_PROCESS(a1) (_db_process_ = a1)
|
||||
# define DBUG_FILE (_db_fp_)
|
||||
# define DBUG_SETJMP(a1) (_db_setjmp_ (), setjmp (a1))
|
||||
# define DBUG_LONGJMP(a1,a2) (_db_longjmp_ (), longjmp (a1, a2))
|
||||
# define DBUG_DUMP(keyword,a1,a2) _db_dump_(__LINE__,keyword,a1,a2)
|
||||
# endif
|
||||
9
deps/mysqllite/dbug/monty.doc
vendored
9
deps/mysqllite/dbug/monty.doc
vendored
@@ -1,9 +0,0 @@
|
||||
|
||||
All changes that I or other people at MySQL AB have done to all files
|
||||
in the dbug library (Mainly in dbug.c, dbug_analyze.c, dbug_long.h,
|
||||
dbug.h) are put in public domain, as the rest of the dbug.c library)
|
||||
|
||||
To my knowledge, all code in dbug library is in public domain.
|
||||
|
||||
Michael Widenius
|
||||
|
||||
1213
deps/mysqllite/dbug/user.r
vendored
1213
deps/mysqllite/dbug/user.r
vendored
File diff suppressed because it is too large
Load Diff
107
deps/mysqllite/include/decimal.h
vendored
107
deps/mysqllite/include/decimal.h
vendored
@@ -1,107 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _decimal_h
|
||||
#define _decimal_h
|
||||
|
||||
typedef enum
|
||||
{TRUNCATE=0, HALF_EVEN, HALF_UP, CEILING, FLOOR}
|
||||
decimal_round_mode;
|
||||
typedef int32 decimal_digit_t;
|
||||
|
||||
typedef struct st_decimal_t {
|
||||
int intg, frac, len;
|
||||
my_bool sign;
|
||||
decimal_digit_t *buf;
|
||||
} decimal_t;
|
||||
|
||||
int internal_str2dec(const char *from, decimal_t *to, char **end,
|
||||
my_bool fixed);
|
||||
int decimal2string(decimal_t *from, char *to, int *to_len,
|
||||
int fixed_precision, int fixed_decimals,
|
||||
char filler);
|
||||
int decimal2ulonglong(decimal_t *from, ulonglong *to);
|
||||
int ulonglong2decimal(ulonglong from, decimal_t *to);
|
||||
int decimal2longlong(decimal_t *from, longlong *to);
|
||||
int longlong2decimal(longlong from, decimal_t *to);
|
||||
int decimal2double(decimal_t *from, double *to);
|
||||
int double2decimal(double from, decimal_t *to);
|
||||
int decimal_actual_fraction(decimal_t *from);
|
||||
int decimal2bin(decimal_t *from, uchar *to, int precision, int scale);
|
||||
int bin2decimal(const uchar *from, decimal_t *to, int precision, int scale);
|
||||
|
||||
int decimal_size(int precision, int scale);
|
||||
int decimal_bin_size(int precision, int scale);
|
||||
int decimal_result_size(decimal_t *from1, decimal_t *from2, char op,
|
||||
int param);
|
||||
|
||||
int decimal_intg(decimal_t *from);
|
||||
int decimal_add(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_sub(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_cmp(decimal_t *from1, decimal_t *from2);
|
||||
int decimal_mul(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_div(decimal_t *from1, decimal_t *from2, decimal_t *to,
|
||||
int scale_incr);
|
||||
int decimal_mod(decimal_t *from1, decimal_t *from2, decimal_t *to);
|
||||
int decimal_round(decimal_t *from, decimal_t *to, int new_scale,
|
||||
decimal_round_mode mode);
|
||||
int decimal_is_zero(decimal_t *from);
|
||||
void max_decimal(int precision, int frac, decimal_t *to);
|
||||
|
||||
#define string2decimal(A,B,C) internal_str2dec((A), (B), (C), 0)
|
||||
#define string2decimal_fixed(A,B,C) internal_str2dec((A), (B), (C), 1)
|
||||
|
||||
/* set a decimal_t to zero */
|
||||
|
||||
#define decimal_make_zero(dec) do { \
|
||||
(dec)->buf[0]=0; \
|
||||
(dec)->intg=1; \
|
||||
(dec)->frac=0; \
|
||||
(dec)->sign=0; \
|
||||
} while(0)
|
||||
|
||||
/*
|
||||
returns the length of the buffer to hold string representation
|
||||
of the decimal (including decimal dot, possible sign and \0)
|
||||
*/
|
||||
|
||||
#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \
|
||||
(dec)->frac + ((dec)->frac > 0) + 2)
|
||||
|
||||
/* negate a decimal */
|
||||
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)
|
||||
|
||||
/*
|
||||
conventions:
|
||||
|
||||
decimal_smth() == 0 -- everything's ok
|
||||
decimal_smth() <= 1 -- result is usable, but precision loss is possible
|
||||
decimal_smth() <= 2 -- result can be unusable, most significant digits
|
||||
could've been lost
|
||||
decimal_smth() > 2 -- no result was generated
|
||||
*/
|
||||
|
||||
#define E_DEC_OK 0
|
||||
#define E_DEC_TRUNCATED 1
|
||||
#define E_DEC_OVERFLOW 2
|
||||
#define E_DEC_DIV_ZERO 4
|
||||
#define E_DEC_BAD_NUM 8
|
||||
#define E_DEC_OOM 16
|
||||
|
||||
#define E_DEC_ERROR 31
|
||||
#define E_DEC_FATAL_ERROR 30
|
||||
|
||||
#endif
|
||||
|
||||
108
deps/mysqllite/include/errmsg.h
vendored
108
deps/mysqllite/include/errmsg.h
vendored
@@ -1,108 +0,0 @@
|
||||
#ifndef ERRMSG_INCLUDED
|
||||
#define ERRMSG_INCLUDED
|
||||
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Error messages for MySQL clients */
|
||||
/* (Error messages for the daemon are in sql/share/errmsg.txt) */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void init_client_errs(void);
|
||||
void finish_client_errs(void);
|
||||
extern const char *client_errors[]; /* Error messages */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define CR_MIN_ERROR 2000 /* For easier client code */
|
||||
#define CR_MAX_ERROR 2999
|
||||
#if !defined(ER)
|
||||
#define ER(X) client_errors[(X)-CR_MIN_ERROR]
|
||||
#endif
|
||||
#define CLIENT_ERRMAP 2 /* Errormap used by my_error() */
|
||||
|
||||
/* Do not add error numbers before CR_ERROR_FIRST. */
|
||||
/* If necessary to add lower numbers, change CR_ERROR_FIRST accordingly. */
|
||||
#define CR_ERROR_FIRST 2000 /*Copy first error nr.*/
|
||||
#define CR_UNKNOWN_ERROR 2000
|
||||
#define CR_SOCKET_CREATE_ERROR 2001
|
||||
#define CR_CONNECTION_ERROR 2002
|
||||
#define CR_CONN_HOST_ERROR 2003
|
||||
#define CR_IPSOCK_ERROR 2004
|
||||
#define CR_UNKNOWN_HOST 2005
|
||||
#define CR_SERVER_GONE_ERROR 2006
|
||||
#define CR_VERSION_ERROR 2007
|
||||
#define CR_OUT_OF_MEMORY 2008
|
||||
#define CR_WRONG_HOST_INFO 2009
|
||||
#define CR_LOCALHOST_CONNECTION 2010
|
||||
#define CR_TCP_CONNECTION 2011
|
||||
#define CR_SERVER_HANDSHAKE_ERR 2012
|
||||
#define CR_SERVER_LOST 2013
|
||||
#define CR_COMMANDS_OUT_OF_SYNC 2014
|
||||
#define CR_NAMEDPIPE_CONNECTION 2015
|
||||
#define CR_NAMEDPIPEWAIT_ERROR 2016
|
||||
#define CR_NAMEDPIPEOPEN_ERROR 2017
|
||||
#define CR_NAMEDPIPESETSTATE_ERROR 2018
|
||||
#define CR_CANT_READ_CHARSET 2019
|
||||
#define CR_NET_PACKET_TOO_LARGE 2020
|
||||
#define CR_EMBEDDED_CONNECTION 2021
|
||||
#define CR_PROBE_SLAVE_STATUS 2022
|
||||
#define CR_PROBE_SLAVE_HOSTS 2023
|
||||
#define CR_PROBE_SLAVE_CONNECT 2024
|
||||
#define CR_PROBE_MASTER_CONNECT 2025
|
||||
#define CR_SSL_CONNECTION_ERROR 2026
|
||||
#define CR_MALFORMED_PACKET 2027
|
||||
#define CR_WRONG_LICENSE 2028
|
||||
|
||||
/* new 4.1 error codes */
|
||||
#define CR_NULL_POINTER 2029
|
||||
#define CR_NO_PREPARE_STMT 2030
|
||||
#define CR_PARAMS_NOT_BOUND 2031
|
||||
#define CR_DATA_TRUNCATED 2032
|
||||
#define CR_NO_PARAMETERS_EXISTS 2033
|
||||
#define CR_INVALID_PARAMETER_NO 2034
|
||||
#define CR_INVALID_BUFFER_USE 2035
|
||||
#define CR_UNSUPPORTED_PARAM_TYPE 2036
|
||||
|
||||
#define CR_SHARED_MEMORY_CONNECTION 2037
|
||||
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
|
||||
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
|
||||
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
|
||||
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
|
||||
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
|
||||
#define CR_SHARED_MEMORY_MAP_ERROR 2043
|
||||
#define CR_SHARED_MEMORY_EVENT_ERROR 2044
|
||||
#define CR_SHARED_MEMORY_CONNECT_ABANDONED_ERROR 2045
|
||||
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
|
||||
#define CR_CONN_UNKNOW_PROTOCOL 2047
|
||||
#define CR_INVALID_CONN_HANDLE 2048
|
||||
#define CR_SECURE_AUTH 2049
|
||||
#define CR_FETCH_CANCELED 2050
|
||||
#define CR_NO_DATA 2051
|
||||
#define CR_NO_STMT_METADATA 2052
|
||||
#define CR_NO_RESULT_SET 2053
|
||||
#define CR_NOT_IMPLEMENTED 2054
|
||||
#define CR_SERVER_LOST_EXTENDED 2055
|
||||
#define CR_STMT_CLOSED 2056
|
||||
#define CR_NEW_STMT_METADATA 2057
|
||||
#define CR_ALREADY_CONNECTED 2058
|
||||
#define CR_AUTH_PLUGIN_CANNOT_LOAD 2059
|
||||
#define CR_ERROR_LAST /*Copy last error nr:*/ 2059
|
||||
/* Add error numbers before CR_ERROR_LAST and change it accordingly. */
|
||||
|
||||
#endif /* ERRMSG_INCLUDED */
|
||||
@@ -1,42 +0,0 @@
|
||||
#ifndef ATOMIC_GCC_BUILTINS_INCLUDED
|
||||
#define ATOMIC_GCC_BUILTINS_INCLUDED
|
||||
|
||||
/* Copyright (C) 2008 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define make_atomic_add_body(S) \
|
||||
v= __sync_fetch_and_add(a, v);
|
||||
#define make_atomic_fas_body(S) \
|
||||
v= __sync_lock_test_and_set(a, v);
|
||||
#define make_atomic_cas_body(S) \
|
||||
int ## S sav; \
|
||||
int ## S cmp_val= *cmp; \
|
||||
sav= __sync_val_compare_and_swap(a, cmp_val, set);\
|
||||
if (!(ret= (sav == cmp_val))) *cmp= sav
|
||||
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
#define make_atomic_load_body(S) ret= *a
|
||||
#define make_atomic_store_body(S) *a= v
|
||||
#define MY_ATOMIC_MODE "gcc-builtins-up"
|
||||
|
||||
#else
|
||||
#define MY_ATOMIC_MODE "gcc-builtins-smp"
|
||||
#define make_atomic_load_body(S) \
|
||||
ret= __sync_fetch_and_or(a, 0);
|
||||
#define make_atomic_store_body(S) \
|
||||
(void) __sync_lock_test_and_set(a, v);
|
||||
#endif
|
||||
|
||||
#endif /* ATOMIC_GCC_BUILTINS_INCLUDED */
|
||||
@@ -1,134 +0,0 @@
|
||||
/* Copyright (C) 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _atomic_h_cleanup_
|
||||
#define _atomic_h_cleanup_ "atomic/generic-msvc.h"
|
||||
|
||||
/*
|
||||
We don't implement anything specific for MY_ATOMIC_MODE_DUMMY, always use
|
||||
intrinsics.
|
||||
8 and 16-bit atomics are not implemented, but it can be done if necessary.
|
||||
*/
|
||||
#undef MY_ATOMIC_HAS_8_16
|
||||
|
||||
#include <windows.h>
|
||||
/*
|
||||
x86 compilers (both VS2003 or VS2005) never use instrinsics, but generate
|
||||
function calls to kernel32 instead, even in the optimized build.
|
||||
We force intrinsics as described in MSDN documentation for
|
||||
_InterlockedCompareExchange.
|
||||
*/
|
||||
#ifdef _M_IX86
|
||||
|
||||
#if (_MSC_VER >= 1500)
|
||||
#include <intrin.h>
|
||||
#else
|
||||
C_MODE_START
|
||||
/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/
|
||||
LONG _InterlockedCompareExchange (LONG volatile *Target, LONG Value, LONG Comp);
|
||||
LONGLONG _InterlockedCompareExchange64 (LONGLONG volatile *Target,
|
||||
LONGLONG Value, LONGLONG Comp);
|
||||
C_MODE_END
|
||||
|
||||
#pragma intrinsic(_InterlockedCompareExchange)
|
||||
#pragma intrinsic(_InterlockedCompareExchange64)
|
||||
#endif
|
||||
|
||||
#define InterlockedCompareExchange _InterlockedCompareExchange
|
||||
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
|
||||
/*
|
||||
No need to do something special for InterlockedCompareExchangePointer
|
||||
as it is a #define to InterlockedCompareExchange. The same applies to
|
||||
InterlockedExchangePointer.
|
||||
*/
|
||||
#endif /*_M_IX86*/
|
||||
|
||||
#define MY_ATOMIC_MODE "msvc-intrinsics"
|
||||
/* Implement using CAS on WIN32 */
|
||||
#define IL_COMP_EXCHG32(X,Y,Z) \
|
||||
InterlockedCompareExchange((volatile LONG *)(X),(Y),(Z))
|
||||
#define IL_COMP_EXCHG64(X,Y,Z) \
|
||||
InterlockedCompareExchange64((volatile LONGLONG *)(X), \
|
||||
(LONGLONG)(Y),(LONGLONG)(Z))
|
||||
#define IL_COMP_EXCHGptr InterlockedCompareExchangePointer
|
||||
|
||||
#define make_atomic_cas_body(S) \
|
||||
int ## S initial_cmp= *cmp; \
|
||||
int ## S initial_a= IL_COMP_EXCHG ## S (a, set, initial_cmp); \
|
||||
if (!(ret= (initial_a == initial_cmp))) *cmp= initial_a;
|
||||
|
||||
#ifndef _M_IX86
|
||||
/* Use full set of optimised functions on WIN64 */
|
||||
#define IL_EXCHG_ADD32(X,Y) \
|
||||
InterlockedExchangeAdd((volatile LONG *)(X),(Y))
|
||||
#define IL_EXCHG_ADD64(X,Y) \
|
||||
InterlockedExchangeAdd64((volatile LONGLONG *)(X),(LONGLONG)(Y))
|
||||
#define IL_EXCHG32(X,Y) \
|
||||
InterlockedExchange((volatile LONG *)(X),(Y))
|
||||
#define IL_EXCHG64(X,Y) \
|
||||
InterlockedExchange64((volatile LONGLONG *)(X),(LONGLONG)(Y))
|
||||
#define IL_EXCHGptr InterlockedExchangePointer
|
||||
|
||||
#define make_atomic_add_body(S) \
|
||||
v= IL_EXCHG_ADD ## S (a, v)
|
||||
#define make_atomic_swap_body(S) \
|
||||
v= IL_EXCHG ## S (a, v)
|
||||
#define make_atomic_load_body(S) \
|
||||
ret= 0; /* avoid compiler warning */ \
|
||||
ret= IL_COMP_EXCHG ## S (a, ret, ret);
|
||||
#endif
|
||||
/*
|
||||
my_yield_processor (equivalent of x86 PAUSE instruction) should be used
|
||||
to improve performance on hyperthreaded CPUs. Intel recommends to use it in
|
||||
spin loops also on non-HT machines to reduce power consumption (see e.g
|
||||
http://softwarecommunity.intel.com/articles/eng/2004.htm)
|
||||
|
||||
Running benchmarks for spinlocks implemented with InterlockedCompareExchange
|
||||
and YieldProcessor shows that much better performance is achieved by calling
|
||||
YieldProcessor in a loop - that is, yielding longer. On Intel boxes setting
|
||||
loop count in the range 200-300 brought best results.
|
||||
*/
|
||||
#ifndef YIELD_LOOPS
|
||||
#define YIELD_LOOPS 200
|
||||
#endif
|
||||
|
||||
static __inline int my_yield_processor()
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<YIELD_LOOPS; i++)
|
||||
{
|
||||
#if (_MSC_VER <= 1310)
|
||||
/* On older compilers YieldProcessor is not available, use inline assembly*/
|
||||
__asm { rep nop }
|
||||
#else
|
||||
YieldProcessor();
|
||||
#endif
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
#define LF_BACKOFF my_yield_processor()
|
||||
#else /* cleanup */
|
||||
|
||||
#undef IL_EXCHG_ADD32
|
||||
#undef IL_EXCHG_ADD64
|
||||
#undef IL_COMP_EXCHG32
|
||||
#undef IL_COMP_EXCHG64
|
||||
#undef IL_COMP_EXCHGptr
|
||||
#undef IL_EXCHG32
|
||||
#undef IL_EXCHG64
|
||||
#undef IL_EXCHGptr
|
||||
|
||||
#endif
|
||||
69
deps/mysqllite/include/internal/atomic/nolock.h
vendored
69
deps/mysqllite/include/internal/atomic/nolock.h
vendored
@@ -1,69 +0,0 @@
|
||||
#ifndef ATOMIC_NOLOCK_INCLUDED
|
||||
#define ATOMIC_NOLOCK_INCLUDED
|
||||
|
||||
/* Copyright (C) 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#if defined(__i386__) || defined(_MSC_VER) || defined(__x86_64__) \
|
||||
|| defined(HAVE_GCC_ATOMIC_BUILTINS) \
|
||||
|| defined(HAVE_SOLARIS_ATOMIC)
|
||||
|
||||
# ifdef MY_ATOMIC_MODE_DUMMY
|
||||
# define LOCK_prefix ""
|
||||
# else
|
||||
# define LOCK_prefix "lock"
|
||||
# endif
|
||||
/*
|
||||
We choose implementation as follows:
|
||||
------------------------------------
|
||||
On Windows using Visual C++ the native implementation should be
|
||||
preferrable. When using gcc we prefer the Solaris implementation
|
||||
before the gcc because of stability preference, we choose gcc
|
||||
builtins if available, otherwise we choose the somewhat broken
|
||||
native x86 implementation. If neither Visual C++ or gcc we still
|
||||
choose the Solaris implementation on Solaris (mainly for SunStudio
|
||||
compilers).
|
||||
*/
|
||||
# if defined(_MSV_VER)
|
||||
# include "generic-msvc.h"
|
||||
# elif __GNUC__
|
||||
# if defined(HAVE_SOLARIS_ATOMIC)
|
||||
# include "solaris.h"
|
||||
# elif defined(HAVE_GCC_ATOMIC_BUILTINS)
|
||||
# include "gcc_builtins.h"
|
||||
# elif defined(__i386__) || defined(__x86_64__)
|
||||
# include "x86-gcc.h"
|
||||
# endif
|
||||
# elif defined(HAVE_SOLARIS_ATOMIC)
|
||||
# include "solaris.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(make_atomic_cas_body)
|
||||
/*
|
||||
Type not used so minimal size (emptry struct has different size between C
|
||||
and C++, zero-length array is gcc-specific).
|
||||
*/
|
||||
typedef char my_atomic_rwlock_t __attribute__ ((unused));
|
||||
#define my_atomic_rwlock_destroy(name)
|
||||
#define my_atomic_rwlock_init(name)
|
||||
#define my_atomic_rwlock_rdlock(name)
|
||||
#define my_atomic_rwlock_wrlock(name)
|
||||
#define my_atomic_rwlock_rdunlock(name)
|
||||
#define my_atomic_rwlock_wrunlock(name)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* ATOMIC_NOLOCK_INCLUDED */
|
||||
100
deps/mysqllite/include/internal/atomic/rwlock.h
vendored
100
deps/mysqllite/include/internal/atomic/rwlock.h
vendored
@@ -1,100 +0,0 @@
|
||||
#ifndef ATOMIC_RWLOCK_INCLUDED
|
||||
#define ATOMIC_RWLOCK_INCLUDED
|
||||
|
||||
/* Copyright (C) 2006 MySQL AB, 2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#define MY_ATOMIC_MODE_RWLOCKS 1
|
||||
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
/*
|
||||
the following can never be enabled by ./configure, one need to put #define in
|
||||
a source to trigger the following warning. The resulting code will be broken,
|
||||
it only makes sense to do it to see now test_atomic detects broken
|
||||
implementations (another way is to run a UP build on an SMP box).
|
||||
*/
|
||||
#warning MY_ATOMIC_MODE_DUMMY and MY_ATOMIC_MODE_RWLOCKS are incompatible
|
||||
|
||||
typedef char my_atomic_rwlock_t;
|
||||
|
||||
#define my_atomic_rwlock_destroy(name)
|
||||
#define my_atomic_rwlock_init(name)
|
||||
#define my_atomic_rwlock_rdlock(name)
|
||||
#define my_atomic_rwlock_wrlock(name)
|
||||
#define my_atomic_rwlock_rdunlock(name)
|
||||
#define my_atomic_rwlock_wrunlock(name)
|
||||
#define MY_ATOMIC_MODE "dummy (non-atomic)"
|
||||
#else /* not MY_ATOMIC_MODE_DUMMY */
|
||||
|
||||
typedef struct {pthread_mutex_t rw;} my_atomic_rwlock_t;
|
||||
|
||||
#ifndef SAFE_MUTEX
|
||||
|
||||
/*
|
||||
we're using read-write lock macros but map them to mutex locks, and they're
|
||||
faster. Still, having semantically rich API we can change the
|
||||
underlying implementation, if necessary.
|
||||
*/
|
||||
#define my_atomic_rwlock_destroy(name) pthread_mutex_destroy(& (name)->rw)
|
||||
#define my_atomic_rwlock_init(name) pthread_mutex_init(& (name)->rw, 0)
|
||||
#define my_atomic_rwlock_rdlock(name) pthread_mutex_lock(& (name)->rw)
|
||||
#define my_atomic_rwlock_wrlock(name) pthread_mutex_lock(& (name)->rw)
|
||||
#define my_atomic_rwlock_rdunlock(name) pthread_mutex_unlock(& (name)->rw)
|
||||
#define my_atomic_rwlock_wrunlock(name) pthread_mutex_unlock(& (name)->rw)
|
||||
|
||||
#else /* SAFE_MUTEX */
|
||||
|
||||
/*
|
||||
SAFE_MUTEX pollutes the compiling name space with macros
|
||||
that alter pthread_mutex_t, pthread_mutex_init, etc.
|
||||
Atomic operations should never use the safe mutex wrappers.
|
||||
Unfortunately, there is no way to have both:
|
||||
- safe mutex macros expanding pthread_mutex_lock to safe_mutex_lock
|
||||
- my_atomic macros expanding to unmodified pthread_mutex_lock
|
||||
inlined in the same compilation unit.
|
||||
So, in case of SAFE_MUTEX, a function call is required.
|
||||
Given that SAFE_MUTEX is a debugging facility,
|
||||
this extra function call is not a performance concern for
|
||||
production builds.
|
||||
*/
|
||||
C_MODE_START
|
||||
extern void plain_pthread_mutex_init(safe_mutex_t *);
|
||||
extern void plain_pthread_mutex_destroy(safe_mutex_t *);
|
||||
extern void plain_pthread_mutex_lock(safe_mutex_t *);
|
||||
extern void plain_pthread_mutex_unlock(safe_mutex_t *);
|
||||
C_MODE_END
|
||||
|
||||
#define my_atomic_rwlock_destroy(name) plain_pthread_mutex_destroy(&(name)->rw)
|
||||
#define my_atomic_rwlock_init(name) plain_pthread_mutex_init(&(name)->rw)
|
||||
#define my_atomic_rwlock_rdlock(name) plain_pthread_mutex_lock(&(name)->rw)
|
||||
#define my_atomic_rwlock_wrlock(name) plain_pthread_mutex_lock(&(name)->rw)
|
||||
#define my_atomic_rwlock_rdunlock(name) plain_pthread_mutex_unlock(&(name)->rw)
|
||||
#define my_atomic_rwlock_wrunlock(name) plain_pthread_mutex_unlock(&(name)->rw)
|
||||
|
||||
#endif /* SAFE_MUTEX */
|
||||
|
||||
#define MY_ATOMIC_MODE "mutex"
|
||||
#ifndef MY_ATOMIC_MODE_RWLOCKS
|
||||
#define MY_ATOMIC_MODE_RWLOCKS 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define make_atomic_add_body(S) int ## S sav; sav= *a; *a+= v; v=sav;
|
||||
#define make_atomic_fas_body(S) int ## S sav; sav= *a; *a= v; v=sav;
|
||||
#define make_atomic_cas_body(S) if ((ret= (*a == *cmp))) *a= set; else *cmp=*a;
|
||||
#define make_atomic_load_body(S) ret= *a;
|
||||
#define make_atomic_store_body(S) *a= v;
|
||||
|
||||
#endif /* ATOMIC_RWLOCK_INCLUDED */
|
||||
72
deps/mysqllite/include/internal/atomic/solaris.h
vendored
72
deps/mysqllite/include/internal/atomic/solaris.h
vendored
@@ -1,72 +0,0 @@
|
||||
/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _atomic_h_cleanup_
|
||||
#define _atomic_h_cleanup_ "atomic/solaris.h"
|
||||
|
||||
#include <atomic.h>
|
||||
|
||||
#define MY_ATOMIC_MODE "solaris-atomic"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define atomic_typeof(T,V) __typeof__(V)
|
||||
#else
|
||||
#define atomic_typeof(T,V) T
|
||||
#endif
|
||||
|
||||
#define uintptr_t void *
|
||||
#define atomic_or_ptr_nv(X,Y) (void *)atomic_or_ulong_nv((volatile ulong_t *)X, Y)
|
||||
|
||||
#define make_atomic_cas_body(S) \
|
||||
atomic_typeof(uint ## S ## _t, *cmp) sav; \
|
||||
sav = atomic_cas_ ## S( \
|
||||
(volatile uint ## S ## _t *)a, \
|
||||
(uint ## S ## _t)*cmp, \
|
||||
(uint ## S ## _t)set); \
|
||||
if (! (ret= (sav == *cmp))) \
|
||||
*cmp= sav;
|
||||
|
||||
#define make_atomic_add_body(S) \
|
||||
int ## S nv; /* new value */ \
|
||||
nv= atomic_add_ ## S ## _nv((volatile uint ## S ## _t *)a, v); \
|
||||
v= nv - v
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
|
||||
#define make_atomic_load_body(S) ret= *a
|
||||
#define make_atomic_store_body(S) *a= v
|
||||
|
||||
#else /* MY_ATOMIC_MODE_DUMMY */
|
||||
|
||||
#define make_atomic_load_body(S) \
|
||||
ret= atomic_or_ ## S ## _nv((volatile uint ## S ## _t *)a, 0)
|
||||
|
||||
#define make_atomic_store_body(S) \
|
||||
(void) atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
|
||||
|
||||
#endif
|
||||
|
||||
#define make_atomic_fas_body(S) \
|
||||
v= atomic_swap_ ## S((volatile uint ## S ## _t *)a, (uint ## S ## _t)v)
|
||||
|
||||
#else /* cleanup */
|
||||
|
||||
#undef uintptr_t
|
||||
#undef atomic_or_ptr_nv
|
||||
|
||||
#endif
|
||||
|
||||
145
deps/mysqllite/include/internal/atomic/x86-gcc.h
vendored
145
deps/mysqllite/include/internal/atomic/x86-gcc.h
vendored
@@ -1,145 +0,0 @@
|
||||
#ifndef ATOMIC_X86_GCC_INCLUDED
|
||||
#define ATOMIC_X86_GCC_INCLUDED
|
||||
|
||||
/* Copyright (C) 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
XXX 64-bit atomic operations can be implemented using
|
||||
cmpxchg8b, if necessary. Though I've heard that not all 64-bit
|
||||
architectures support double-word (128-bit) cas.
|
||||
*/
|
||||
|
||||
/*
|
||||
No special support of 8 and 16 bit operations are implemented here
|
||||
currently.
|
||||
*/
|
||||
#undef MY_ATOMIC_HAS_8_AND_16
|
||||
|
||||
#ifdef __x86_64__
|
||||
# ifdef MY_ATOMIC_NO_XADD
|
||||
# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix "-no-xadd"
|
||||
# else
|
||||
# define MY_ATOMIC_MODE "gcc-amd64" LOCK_prefix
|
||||
# endif
|
||||
#else
|
||||
# ifdef MY_ATOMIC_NO_XADD
|
||||
# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix "-no-xadd"
|
||||
# else
|
||||
# define MY_ATOMIC_MODE "gcc-x86" LOCK_prefix
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* fix -ansi errors while maintaining readability */
|
||||
#ifndef asm
|
||||
#define asm __asm__
|
||||
#endif
|
||||
|
||||
#ifndef MY_ATOMIC_NO_XADD
|
||||
#define make_atomic_add_body(S) make_atomic_add_body ## S
|
||||
#define make_atomic_cas_body(S) make_atomic_cas_body ## S
|
||||
#endif
|
||||
|
||||
#define make_atomic_add_body32 \
|
||||
asm volatile (LOCK_prefix "; xadd %0, %1;" \
|
||||
: "+r" (v), "=m" (*a) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
#define make_atomic_cas_body32 \
|
||||
__typeof__(*cmp) sav; \
|
||||
asm volatile (LOCK_prefix "; cmpxchg %3, %0; setz %2;" \
|
||||
: "=m" (*a), "=a" (sav), "=q" (ret) \
|
||||
: "r" (set), "m" (*a), "a" (*cmp) \
|
||||
: "memory"); \
|
||||
if (!ret) \
|
||||
*cmp= sav
|
||||
|
||||
#ifdef __x86_64__
|
||||
#define make_atomic_add_body64 make_atomic_add_body32
|
||||
#define make_atomic_cas_body64 make_atomic_cas_body32
|
||||
|
||||
#define make_atomic_fas_body(S) \
|
||||
asm volatile ("xchg %0, %1;" \
|
||||
: "+r" (v), "=m" (*a) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
/*
|
||||
Actually 32/64-bit reads/writes are always atomic on x86_64,
|
||||
nonetheless issue memory barriers as appropriate.
|
||||
*/
|
||||
#define make_atomic_load_body(S) \
|
||||
/* Serialize prior load and store operations. */ \
|
||||
asm volatile ("mfence" ::: "memory"); \
|
||||
ret= *a; \
|
||||
/* Prevent compiler from reordering instructions. */ \
|
||||
asm volatile ("" ::: "memory")
|
||||
#define make_atomic_store_body(S) \
|
||||
asm volatile ("; xchg %0, %1;" \
|
||||
: "=m" (*a), "+r" (v) \
|
||||
: "m" (*a) \
|
||||
: "memory")
|
||||
|
||||
#else
|
||||
/*
|
||||
Use default implementations of 64-bit operations since we solved
|
||||
the 64-bit problem on 32-bit platforms for CAS, no need to solve it
|
||||
once more for ADD, LOAD, STORE and FAS as well.
|
||||
Since we already added add32 support, we need to define add64
|
||||
here, but we haven't defined fas, load and store at all, so
|
||||
we can fallback on default implementations.
|
||||
*/
|
||||
#define make_atomic_add_body64 \
|
||||
int64 tmp=*a; \
|
||||
while (!my_atomic_cas64(a, &tmp, tmp+v)) ; \
|
||||
v=tmp;
|
||||
|
||||
/*
|
||||
On some platforms (e.g. Mac OS X and Solaris) the ebx register
|
||||
is held as a pointer to the global offset table. Thus we're not
|
||||
allowed to use the b-register on those platforms when compiling
|
||||
PIC code, to avoid this we push ebx and pop ebx. The new value
|
||||
is copied directly from memory to avoid problems with a implicit
|
||||
manipulation of the stack pointer by the push.
|
||||
|
||||
cmpxchg8b works on both 32-bit platforms and 64-bit platforms but
|
||||
the code here is only used on 32-bit platforms, on 64-bit
|
||||
platforms the much simpler make_atomic_cas_body32 will work
|
||||
fine.
|
||||
*/
|
||||
#define make_atomic_cas_body64 \
|
||||
asm volatile ("push %%ebx;" \
|
||||
"movl (%%ecx), %%ebx;" \
|
||||
"movl 4(%%ecx), %%ecx;" \
|
||||
LOCK_prefix "; cmpxchg8b %0;" \
|
||||
"setz %2; pop %%ebx" \
|
||||
: "=m" (*a), "+A" (*cmp), "=c" (ret) \
|
||||
: "c" (&set), "m" (*a) \
|
||||
: "memory", "esp")
|
||||
#endif
|
||||
|
||||
/*
|
||||
The implementation of make_atomic_cas_body32 is adaptable to
|
||||
the OS word size, so on 64-bit platforms it will automatically
|
||||
adapt to 64-bits and so it will work also on 64-bit platforms
|
||||
*/
|
||||
#define make_atomic_cas_bodyptr make_atomic_cas_body32
|
||||
|
||||
#ifdef MY_ATOMIC_MODE_DUMMY
|
||||
#define make_atomic_load_body(S) ret=*a
|
||||
#define make_atomic_store_body(S) *a=v
|
||||
#endif
|
||||
#endif /* ATOMIC_X86_GCC_INCLUDED */
|
||||
48
deps/mysqllite/include/internal/base64.h
vendored
48
deps/mysqllite/include/internal/base64.h
vendored
@@ -1,48 +0,0 @@
|
||||
/* Copyright (C) 2003 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef __BASE64_H_INCLUDED__
|
||||
#define __BASE64_H_INCLUDED__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
Calculate how much memory needed for dst of base64_encode()
|
||||
*/
|
||||
int base64_needed_encoded_length(int length_of_data);
|
||||
|
||||
/*
|
||||
Calculate how much memory needed for dst of base64_decode()
|
||||
*/
|
||||
int base64_needed_decoded_length(int length_of_encoded_data);
|
||||
|
||||
/*
|
||||
Encode data as a base64 string
|
||||
*/
|
||||
int base64_encode(const void *src, size_t src_len, char *dst);
|
||||
|
||||
/*
|
||||
Decode a base64 string into data
|
||||
*/
|
||||
int base64_decode(const char *src, size_t src_len,
|
||||
void *dst, const char **end_ptr);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* !__BASE64_H_INCLUDED__ */
|
||||
108
deps/mysqllite/include/internal/hash.h
vendored
108
deps/mysqllite/include/internal/hash.h
vendored
@@ -1,108 +0,0 @@
|
||||
/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Dynamic hashing of record with different key-length */
|
||||
|
||||
#ifndef _hash_h
|
||||
#define _hash_h
|
||||
|
||||
#include "my_global.h" /* uchar */
|
||||
#include "my_sys.h" /* DYNAMIC_ARRAY */
|
||||
|
||||
/*
|
||||
This forward declaration is used from C files where the real
|
||||
definition is included before. Since C does not allow repeated
|
||||
typedef declarations, even when identical, the definition may not be
|
||||
repeated.
|
||||
*/
|
||||
#ifndef CHARSET_INFO_DEFINED
|
||||
#define CHARSET_INFO_DEFINED
|
||||
typedef struct charset_info_st CHARSET_INFO;
|
||||
#endif /* CHARSET_INFO_DEFINED */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
Overhead to store an element in hash
|
||||
Can be used to approximate memory consumption for a hash
|
||||
*/
|
||||
#define HASH_OVERHEAD (sizeof(char*)*2)
|
||||
|
||||
/* flags for hash_init */
|
||||
#define HASH_UNIQUE 1 /* hash_insert fails on duplicate key */
|
||||
|
||||
typedef uint my_hash_value_type;
|
||||
typedef uchar *(*my_hash_get_key)(const uchar *,size_t*,my_bool);
|
||||
typedef void (*my_hash_free_key)(void *);
|
||||
|
||||
typedef struct st_hash {
|
||||
size_t key_offset,key_length; /* Length of key if const length */
|
||||
size_t blength;
|
||||
ulong records;
|
||||
uint flags;
|
||||
DYNAMIC_ARRAY array; /* Place for hash_keys */
|
||||
my_hash_get_key get_key;
|
||||
void (*free)(void *);
|
||||
CHARSET_INFO *charset;
|
||||
} HASH;
|
||||
|
||||
/* A search iterator state */
|
||||
typedef uint HASH_SEARCH_STATE;
|
||||
|
||||
#define my_hash_init(A,B,C,D,E,F,G,H) \
|
||||
_my_hash_init(A,0,B,C,D,E,F,G,H)
|
||||
#define my_hash_init2(A,B,C,D,E,F,G,H,I) \
|
||||
_my_hash_init(A,B,C,D,E,F,G,H,I)
|
||||
my_bool _my_hash_init(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
||||
ulong default_array_elements, size_t key_offset,
|
||||
size_t key_length, my_hash_get_key get_key,
|
||||
void (*free_element)(void*),
|
||||
uint flags);
|
||||
void my_hash_free(HASH *tree);
|
||||
void my_hash_reset(HASH *hash);
|
||||
uchar *my_hash_element(HASH *hash, ulong idx);
|
||||
uchar *my_hash_search(const HASH *info, const uchar *key, size_t length);
|
||||
uchar *my_hash_search_using_hash_value(const HASH *info,
|
||||
my_hash_value_type hash_value,
|
||||
const uchar *key, size_t length);
|
||||
my_hash_value_type my_calc_hash(const HASH *info,
|
||||
const uchar *key, size_t length);
|
||||
uchar *my_hash_first(const HASH *info, const uchar *key, size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
uchar *my_hash_first_from_hash_value(const HASH *info,
|
||||
my_hash_value_type hash_value,
|
||||
const uchar *key,
|
||||
size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
uchar *my_hash_next(const HASH *info, const uchar *key, size_t length,
|
||||
HASH_SEARCH_STATE *state);
|
||||
my_bool my_hash_insert(HASH *info, const uchar *data);
|
||||
my_bool my_hash_delete(HASH *hash, uchar *record);
|
||||
my_bool my_hash_update(HASH *hash, uchar *record, uchar *old_key,
|
||||
size_t old_key_length);
|
||||
void my_hash_replace(HASH *hash, HASH_SEARCH_STATE *state, uchar *new_row);
|
||||
my_bool my_hash_check(HASH *hash); /* Only in debug library */
|
||||
|
||||
#define my_hash_clear(H) bzero((char*) (H), sizeof(*(H)))
|
||||
#define my_hash_inited(H) ((H)->blength != 0)
|
||||
#define my_hash_init_opt(A,B,C,D,E,F,G,H) \
|
||||
(!my_hash_inited(A) && _my_hash_init(A,0,B,C,D,E,F,G,H))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
265
deps/mysqllite/include/internal/lf.h
vendored
265
deps/mysqllite/include/internal/lf.h
vendored
@@ -1,265 +0,0 @@
|
||||
/* Copyright (C) 2007-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _lf_h
|
||||
#define _lf_h
|
||||
|
||||
#include <my_atomic.h>
|
||||
|
||||
C_MODE_START
|
||||
|
||||
/*
|
||||
Helpers to define both func() and _func(), where
|
||||
func() is a _func() protected by my_atomic_rwlock_wrlock()
|
||||
*/
|
||||
|
||||
#define lock_wrap(f, t, proto_args, args, lock) \
|
||||
t _ ## f proto_args; \
|
||||
static inline t f proto_args \
|
||||
{ \
|
||||
t ret; \
|
||||
my_atomic_rwlock_wrlock(lock); \
|
||||
ret= _ ## f args; \
|
||||
my_atomic_rwlock_wrunlock(lock); \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
#define lock_wrap_void(f, proto_args, args, lock) \
|
||||
void _ ## f proto_args; \
|
||||
static inline void f proto_args \
|
||||
{ \
|
||||
my_atomic_rwlock_wrlock(lock); \
|
||||
_ ## f args; \
|
||||
my_atomic_rwlock_wrunlock(lock); \
|
||||
}
|
||||
|
||||
#define nolock_wrap(f, t, proto_args, args) \
|
||||
t _ ## f proto_args; \
|
||||
static inline t f proto_args \
|
||||
{ \
|
||||
return _ ## f args; \
|
||||
}
|
||||
|
||||
#define nolock_wrap_void(f, proto_args, args) \
|
||||
void _ ## f proto_args; \
|
||||
static inline void f proto_args \
|
||||
{ \
|
||||
_ ## f args; \
|
||||
}
|
||||
|
||||
/*
|
||||
wait-free dynamic array, see lf_dynarray.c
|
||||
|
||||
4 levels of 256 elements each mean 4311810304 elements in an array - it
|
||||
should be enough for a while
|
||||
*/
|
||||
#define LF_DYNARRAY_LEVEL_LENGTH 256
|
||||
#define LF_DYNARRAY_LEVELS 4
|
||||
|
||||
typedef struct {
|
||||
void * volatile level[LF_DYNARRAY_LEVELS];
|
||||
uint size_of_element;
|
||||
my_atomic_rwlock_t lock;
|
||||
} LF_DYNARRAY;
|
||||
|
||||
typedef int (*lf_dynarray_func)(void *, void *);
|
||||
|
||||
void lf_dynarray_init(LF_DYNARRAY *array, uint element_size);
|
||||
void lf_dynarray_destroy(LF_DYNARRAY *array);
|
||||
|
||||
nolock_wrap(lf_dynarray_value, void *,
|
||||
(LF_DYNARRAY *array, uint idx),
|
||||
(array, idx))
|
||||
lock_wrap(lf_dynarray_lvalue, void *,
|
||||
(LF_DYNARRAY *array, uint idx),
|
||||
(array, idx),
|
||||
&array->lock)
|
||||
nolock_wrap(lf_dynarray_iterate, int,
|
||||
(LF_DYNARRAY *array, lf_dynarray_func func, void *arg),
|
||||
(array, func, arg))
|
||||
|
||||
/*
|
||||
pin manager for memory allocator, lf_alloc-pin.c
|
||||
*/
|
||||
|
||||
#define LF_PINBOX_PINS 4
|
||||
#define LF_PURGATORY_SIZE 10
|
||||
|
||||
typedef void lf_pinbox_free_func(void *, void *, void*);
|
||||
|
||||
typedef struct {
|
||||
LF_DYNARRAY pinarray;
|
||||
lf_pinbox_free_func *free_func;
|
||||
void *free_func_arg;
|
||||
uint free_ptr_offset;
|
||||
uint32 volatile pinstack_top_ver; /* this is a versioned pointer */
|
||||
uint32 volatile pins_in_array; /* number of elements in array */
|
||||
} LF_PINBOX;
|
||||
|
||||
typedef struct {
|
||||
void * volatile pin[LF_PINBOX_PINS];
|
||||
LF_PINBOX *pinbox;
|
||||
void **stack_ends_here;
|
||||
void *purgatory;
|
||||
uint32 purgatory_count;
|
||||
uint32 volatile link;
|
||||
/* we want sizeof(LF_PINS) to be 64 to avoid false sharing */
|
||||
#if SIZEOF_INT*2+SIZEOF_CHARP*(LF_PINBOX_PINS+3) != 64
|
||||
char pad[64-sizeof(uint32)*2-sizeof(void*)*(LF_PINBOX_PINS+3)];
|
||||
#endif
|
||||
} LF_PINS;
|
||||
|
||||
/*
|
||||
shortcut macros to do an atomic_wrlock on a structure that uses pins
|
||||
(e.g. lf_hash).
|
||||
*/
|
||||
#define lf_rwlock_by_pins(PINS) \
|
||||
my_atomic_rwlock_wrlock(&(PINS)->pinbox->pinarray.lock)
|
||||
#define lf_rwunlock_by_pins(PINS) \
|
||||
my_atomic_rwlock_wrunlock(&(PINS)->pinbox->pinarray.lock)
|
||||
|
||||
/*
|
||||
compile-time assert, to require "no less than N" pins
|
||||
it's enough if it'll fail on at least one compiler, so
|
||||
we'll enable it on GCC only, which supports zero-length arrays.
|
||||
*/
|
||||
#if defined(__GNUC__) && defined(MY_LF_EXTRA_DEBUG)
|
||||
#define LF_REQUIRE_PINS(N) \
|
||||
static const char require_pins[LF_PINBOX_PINS-N] \
|
||||
__attribute__ ((unused)); \
|
||||
static const int LF_NUM_PINS_IN_THIS_FILE= N;
|
||||
#define _lf_pin(PINS, PIN, ADDR) \
|
||||
( \
|
||||
assert(PIN < LF_NUM_PINS_IN_THIS_FILE), \
|
||||
my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR)) \
|
||||
)
|
||||
#else
|
||||
#define LF_REQUIRE_PINS(N)
|
||||
#define _lf_pin(PINS, PIN, ADDR) my_atomic_storeptr(&(PINS)->pin[PIN], (ADDR))
|
||||
#endif
|
||||
|
||||
#define _lf_unpin(PINS, PIN) _lf_pin(PINS, PIN, NULL)
|
||||
#define lf_pin(PINS, PIN, ADDR) \
|
||||
do { \
|
||||
lf_rwlock_by_pins(PINS); \
|
||||
_lf_pin(PINS, PIN, ADDR); \
|
||||
lf_rwunlock_by_pins(PINS); \
|
||||
} while (0)
|
||||
#define lf_unpin(PINS, PIN) lf_pin(PINS, PIN, NULL)
|
||||
#define _lf_assert_pin(PINS, PIN) assert((PINS)->pin[PIN] != 0)
|
||||
#define _lf_assert_unpin(PINS, PIN) assert((PINS)->pin[PIN] == 0)
|
||||
|
||||
void lf_pinbox_init(LF_PINBOX *pinbox, uint free_ptr_offset,
|
||||
lf_pinbox_free_func *free_func, void * free_func_arg);
|
||||
void lf_pinbox_destroy(LF_PINBOX *pinbox);
|
||||
|
||||
lock_wrap(lf_pinbox_get_pins, LF_PINS *,
|
||||
(LF_PINBOX *pinbox),
|
||||
(pinbox),
|
||||
&pinbox->pinarray.lock)
|
||||
lock_wrap_void(lf_pinbox_put_pins,
|
||||
(LF_PINS *pins),
|
||||
(pins),
|
||||
&pins->pinbox->pinarray.lock)
|
||||
lock_wrap_void(lf_pinbox_free,
|
||||
(LF_PINS *pins, void *addr),
|
||||
(pins, addr),
|
||||
&pins->pinbox->pinarray.lock)
|
||||
|
||||
/*
|
||||
memory allocator, lf_alloc-pin.c
|
||||
*/
|
||||
|
||||
typedef struct st_lf_allocator {
|
||||
LF_PINBOX pinbox;
|
||||
uchar * volatile top;
|
||||
uint element_size;
|
||||
uint32 volatile mallocs;
|
||||
} LF_ALLOCATOR;
|
||||
|
||||
void lf_alloc_init(LF_ALLOCATOR *allocator, uint size, uint free_ptr_offset);
|
||||
void lf_alloc_destroy(LF_ALLOCATOR *allocator);
|
||||
uint lf_alloc_pool_count(LF_ALLOCATOR *allocator);
|
||||
/*
|
||||
shortcut macros to access underlying pinbox functions from an LF_ALLOCATOR
|
||||
see _lf_pinbox_get_pins() and _lf_pinbox_put_pins()
|
||||
*/
|
||||
#define _lf_alloc_free(PINS, PTR) _lf_pinbox_free((PINS), (PTR))
|
||||
#define lf_alloc_free(PINS, PTR) lf_pinbox_free((PINS), (PTR))
|
||||
#define _lf_alloc_get_pins(A) _lf_pinbox_get_pins(&(A)->pinbox)
|
||||
#define lf_alloc_get_pins(A) lf_pinbox_get_pins(&(A)->pinbox)
|
||||
#define _lf_alloc_put_pins(PINS) _lf_pinbox_put_pins(PINS)
|
||||
#define lf_alloc_put_pins(PINS) lf_pinbox_put_pins(PINS)
|
||||
#define lf_alloc_direct_free(ALLOC, ADDR) my_free((ADDR))
|
||||
|
||||
lock_wrap(lf_alloc_new, void *,
|
||||
(LF_PINS *pins),
|
||||
(pins),
|
||||
&pins->pinbox->pinarray.lock)
|
||||
|
||||
C_MODE_END
|
||||
|
||||
/*
|
||||
extendible hash, lf_hash.c
|
||||
*/
|
||||
#include <hash.h>
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#define LF_HASH_UNIQUE 1
|
||||
|
||||
/* lf_hash overhead per element is sizeof(LF_SLIST). */
|
||||
|
||||
typedef struct {
|
||||
LF_DYNARRAY array; /* hash itself */
|
||||
LF_ALLOCATOR alloc; /* allocator for elements */
|
||||
my_hash_get_key get_key; /* see HASH */
|
||||
CHARSET_INFO *charset; /* see HASH */
|
||||
uint key_offset, key_length; /* see HASH */
|
||||
uint element_size; /* size of memcpy'ed area on insert */
|
||||
uint flags; /* LF_HASH_UNIQUE, etc */
|
||||
int32 volatile size; /* size of array */
|
||||
int32 volatile count; /* number of elements in the hash */
|
||||
} LF_HASH;
|
||||
|
||||
void lf_hash_init(LF_HASH *hash, uint element_size, uint flags,
|
||||
uint key_offset, uint key_length, my_hash_get_key get_key,
|
||||
CHARSET_INFO *charset);
|
||||
void lf_hash_destroy(LF_HASH *hash);
|
||||
int lf_hash_insert(LF_HASH *hash, LF_PINS *pins, const void *data);
|
||||
void *lf_hash_search(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
|
||||
int lf_hash_delete(LF_HASH *hash, LF_PINS *pins, const void *key, uint keylen);
|
||||
/*
|
||||
shortcut macros to access underlying pinbox functions from an LF_HASH
|
||||
see _lf_pinbox_get_pins() and _lf_pinbox_put_pins()
|
||||
*/
|
||||
#define _lf_hash_get_pins(HASH) _lf_alloc_get_pins(&(HASH)->alloc)
|
||||
#define lf_hash_get_pins(HASH) lf_alloc_get_pins(&(HASH)->alloc)
|
||||
#define _lf_hash_put_pins(PINS) _lf_pinbox_put_pins(PINS)
|
||||
#define lf_hash_put_pins(PINS) lf_pinbox_put_pins(PINS)
|
||||
#define lf_hash_search_unpin(PINS) lf_unpin((PINS), 2)
|
||||
/*
|
||||
cleanup
|
||||
*/
|
||||
|
||||
#undef lock_wrap_void
|
||||
#undef lock_wrap
|
||||
#undef nolock_wrap_void
|
||||
#undef nolock_wrap
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif
|
||||
|
||||
70
deps/mysqllite/include/internal/my_aes.h
vendored
70
deps/mysqllite/include/internal/my_aes.h
vendored
@@ -1,70 +0,0 @@
|
||||
#ifndef MY_AES_INCLUDED
|
||||
#define MY_AES_INCLUDED
|
||||
|
||||
/* Copyright (C) 2002 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
/* Header file for my_aes.c */
|
||||
/* Wrapper to give simple interface for MySQL to AES standard encryption */
|
||||
|
||||
#include "rijndael.h"
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#define AES_KEY_LENGTH 128 /* Must be 128 192 or 256 */
|
||||
|
||||
/*
|
||||
my_aes_encrypt - Crypt buffer with AES encryption algorithm.
|
||||
source - Pointer to data for encryption
|
||||
source_length - size of encryption data
|
||||
dest - buffer to place encrypted data (must be large enough)
|
||||
key - Key to be used for encryption
|
||||
kel_length - Length of the key. Will handle keys of any length
|
||||
|
||||
returns - size of encrypted data, or negative in case of error.
|
||||
*/
|
||||
|
||||
int my_aes_encrypt(const char *source, int source_length, char *dest,
|
||||
const char *key, int key_length);
|
||||
|
||||
/*
|
||||
my_aes_decrypt - DeCrypt buffer with AES encryption algorithm.
|
||||
source - Pointer to data for decryption
|
||||
source_length - size of encrypted data
|
||||
dest - buffer to place decrypted data (must be large enough)
|
||||
key - Key to be used for decryption
|
||||
kel_length - Length of the key. Will handle keys of any length
|
||||
|
||||
returns - size of original data, or negative in case of error.
|
||||
*/
|
||||
|
||||
|
||||
int my_aes_decrypt(const char *source, int source_length, char *dest,
|
||||
const char *key, int key_length);
|
||||
|
||||
/*
|
||||
my_aes_get_size - get size of buffer which will be large enough for encrypted
|
||||
data
|
||||
source_length - length of data to be encrypted
|
||||
|
||||
returns - size of buffer required to store encrypted data
|
||||
*/
|
||||
|
||||
int my_aes_get_size(int source_length);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MY_AES_INCLUDED */
|
||||
58
deps/mysqllite/include/internal/my_alarm.h
vendored
58
deps/mysqllite/include/internal/my_alarm.h
vendored
@@ -1,58 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
File to include when we want to use alarm or a loop_counter to display
|
||||
some information when a program is running
|
||||
*/
|
||||
#ifndef _my_alarm_h
|
||||
#define _my_alarm_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int volatile my_have_got_alarm;
|
||||
extern ulong my_time_to_wait_for_lock;
|
||||
|
||||
#if defined(HAVE_ALARM) && !defined(NO_ALARM_LOOP)
|
||||
#include <signal.h>
|
||||
#define ALARM_VARIABLES uint alarm_old=0; \
|
||||
sig_return alarm_signal=0
|
||||
#define ALARM_INIT my_have_got_alarm=0 ; \
|
||||
alarm_old=(uint) alarm(MY_HOW_OFTEN_TO_ALARM); \
|
||||
alarm_signal=signal(SIGALRM,my_set_alarm_variable);
|
||||
#define ALARM_END (void) signal(SIGALRM,alarm_signal); \
|
||||
(void) alarm(alarm_old);
|
||||
#define ALARM_TEST my_have_got_alarm
|
||||
#ifdef SIGNAL_HANDLER_RESET_ON_DELIVERY
|
||||
#define ALARM_REINIT (void) alarm(MY_HOW_OFTEN_TO_ALARM); \
|
||||
(void) signal(SIGALRM,my_set_alarm_variable);\
|
||||
my_have_got_alarm=0;
|
||||
#else
|
||||
#define ALARM_REINIT (void) alarm((uint) MY_HOW_OFTEN_TO_ALARM); \
|
||||
my_have_got_alarm=0;
|
||||
#endif /* SIGNAL_HANDLER_RESET_ON_DELIVERY */
|
||||
#else
|
||||
#define ALARM_VARIABLES long alarm_pos=0,alarm_end_pos=MY_HOW_OFTEN_TO_WRITE-1
|
||||
#define ALARM_INIT
|
||||
#define ALARM_END
|
||||
#define ALARM_TEST (alarm_pos++ >= alarm_end_pos)
|
||||
#define ALARM_REINIT alarm_end_pos+=MY_HOW_OFTEN_TO_WRITE
|
||||
#endif /* HAVE_ALARM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
287
deps/mysqllite/include/internal/my_atomic.h
vendored
287
deps/mysqllite/include/internal/my_atomic.h
vendored
@@ -1,287 +0,0 @@
|
||||
#ifndef MY_ATOMIC_INCLUDED
|
||||
#define MY_ATOMIC_INCLUDED
|
||||
|
||||
/* Copyright (C) 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
This header defines five atomic operations:
|
||||
|
||||
my_atomic_add#(&var, what)
|
||||
'Fetch and Add'
|
||||
add 'what' to *var, and return the old value of *var
|
||||
|
||||
my_atomic_fas#(&var, what)
|
||||
'Fetch And Store'
|
||||
store 'what' in *var, and return the old value of *var
|
||||
|
||||
my_atomic_cas#(&var, &old, new)
|
||||
An odd variation of 'Compare And Set/Swap'
|
||||
if *var is equal to *old, then store 'new' in *var, and return TRUE
|
||||
otherwise store *var in *old, and return FALSE
|
||||
Usually, &old should not be accessed if the operation is successful.
|
||||
|
||||
my_atomic_load#(&var)
|
||||
return *var
|
||||
|
||||
my_atomic_store#(&var, what)
|
||||
store 'what' in *var
|
||||
|
||||
'#' is substituted by a size suffix - 8, 16, 32, 64, or ptr
|
||||
(e.g. my_atomic_add8, my_atomic_fas32, my_atomic_casptr).
|
||||
|
||||
NOTE This operations are not always atomic, so they always must be
|
||||
enclosed in my_atomic_rwlock_rdlock(lock)/my_atomic_rwlock_rdunlock(lock)
|
||||
or my_atomic_rwlock_wrlock(lock)/my_atomic_rwlock_wrunlock(lock).
|
||||
Hint: if a code block makes intensive use of atomic ops, it make sense
|
||||
to take/release rwlock once for the whole block, not for every statement.
|
||||
|
||||
On architectures where these operations are really atomic, rwlocks will
|
||||
be optimized away.
|
||||
8- and 16-bit atomics aren't implemented for windows (see generic-msvc.h),
|
||||
but can be added, if necessary.
|
||||
*/
|
||||
|
||||
#ifndef my_atomic_rwlock_init
|
||||
|
||||
#define intptr void *
|
||||
/**
|
||||
Currently we don't support 8-bit and 16-bit operations.
|
||||
It can be added later if needed.
|
||||
*/
|
||||
#undef MY_ATOMIC_HAS_8_16
|
||||
|
||||
#ifndef MY_ATOMIC_MODE_RWLOCKS
|
||||
/*
|
||||
* Attempt to do atomic ops without locks
|
||||
*/
|
||||
#include "atomic/nolock.h"
|
||||
#endif
|
||||
|
||||
#ifndef make_atomic_cas_body
|
||||
/* nolock.h was not able to generate even a CAS function, fall back */
|
||||
#include "atomic/rwlock.h"
|
||||
#endif
|
||||
|
||||
/* define missing functions by using the already generated ones */
|
||||
#ifndef make_atomic_add_body
|
||||
#define make_atomic_add_body(S) \
|
||||
int ## S tmp=*a; \
|
||||
while (!my_atomic_cas ## S(a, &tmp, tmp+v)) ; \
|
||||
v=tmp;
|
||||
#endif
|
||||
#ifndef make_atomic_fas_body
|
||||
#define make_atomic_fas_body(S) \
|
||||
int ## S tmp=*a; \
|
||||
while (!my_atomic_cas ## S(a, &tmp, v)) ; \
|
||||
v=tmp;
|
||||
#endif
|
||||
#ifndef make_atomic_load_body
|
||||
#define make_atomic_load_body(S) \
|
||||
ret= 0; /* avoid compiler warning */ \
|
||||
(void)(my_atomic_cas ## S(a, &ret, ret));
|
||||
#endif
|
||||
#ifndef make_atomic_store_body
|
||||
#define make_atomic_store_body(S) \
|
||||
(void)(my_atomic_fas ## S (a, v));
|
||||
#endif
|
||||
|
||||
/*
|
||||
transparent_union doesn't work in g++
|
||||
Bug ?
|
||||
|
||||
Darwin's gcc doesn't want to put pointers in a transparent_union
|
||||
when built with -arch ppc64. Complains:
|
||||
warning: 'transparent_union' attribute ignored
|
||||
*/
|
||||
#if defined(__GNUC__) && !defined(__cplusplus) && \
|
||||
! (defined(__APPLE__) && (defined(_ARCH_PPC64) ||defined (_ARCH_PPC)))
|
||||
/*
|
||||
we want to be able to use my_atomic_xxx functions with
|
||||
both signed and unsigned integers. But gcc will issue a warning
|
||||
"passing arg N of `my_atomic_XXX' as [un]signed due to prototype"
|
||||
if the signedness of the argument doesn't match the prototype, or
|
||||
"pointer targets in passing argument N of my_atomic_XXX differ in signedness"
|
||||
if int* is used where uint* is expected (or vice versa).
|
||||
Let's shut these warnings up
|
||||
*/
|
||||
#define make_transparent_unions(S) \
|
||||
typedef union { \
|
||||
int ## S i; \
|
||||
uint ## S u; \
|
||||
} U_ ## S __attribute__ ((transparent_union)); \
|
||||
typedef union { \
|
||||
int ## S volatile *i; \
|
||||
uint ## S volatile *u; \
|
||||
} Uv_ ## S __attribute__ ((transparent_union));
|
||||
#define uintptr intptr
|
||||
make_transparent_unions(8)
|
||||
make_transparent_unions(16)
|
||||
make_transparent_unions(32)
|
||||
make_transparent_unions(64)
|
||||
make_transparent_unions(ptr)
|
||||
#undef uintptr
|
||||
#undef make_transparent_unions
|
||||
#define a U_a.i
|
||||
#define cmp U_cmp.i
|
||||
#define v U_v.i
|
||||
#define set U_set.i
|
||||
#else
|
||||
#define U_8 int8
|
||||
#define U_16 int16
|
||||
#define U_32 int32
|
||||
#define U_64 int64
|
||||
#define U_ptr intptr
|
||||
#define Uv_8 int8
|
||||
#define Uv_16 int16
|
||||
#define Uv_32 int32
|
||||
#define Uv_64 int64
|
||||
#define Uv_ptr intptr
|
||||
#define U_a volatile *a
|
||||
#define U_cmp *cmp
|
||||
#define U_v v
|
||||
#define U_set set
|
||||
#endif /* __GCC__ transparent_union magic */
|
||||
|
||||
#define make_atomic_cas(S) \
|
||||
static inline int my_atomic_cas ## S(Uv_ ## S U_a, \
|
||||
Uv_ ## S U_cmp, U_ ## S U_set) \
|
||||
{ \
|
||||
int8 ret; \
|
||||
make_atomic_cas_body(S); \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
#define make_atomic_add(S) \
|
||||
static inline int ## S my_atomic_add ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_add_body(S); \
|
||||
return v; \
|
||||
}
|
||||
|
||||
#define make_atomic_fas(S) \
|
||||
static inline int ## S my_atomic_fas ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_fas_body(S); \
|
||||
return v; \
|
||||
}
|
||||
|
||||
#define make_atomic_load(S) \
|
||||
static inline int ## S my_atomic_load ## S(Uv_ ## S U_a) \
|
||||
{ \
|
||||
int ## S ret; \
|
||||
make_atomic_load_body(S); \
|
||||
return ret; \
|
||||
}
|
||||
|
||||
#define make_atomic_store(S) \
|
||||
static inline void my_atomic_store ## S( \
|
||||
Uv_ ## S U_a, U_ ## S U_v) \
|
||||
{ \
|
||||
make_atomic_store_body(S); \
|
||||
}
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_cas(8)
|
||||
make_atomic_cas(16)
|
||||
#endif
|
||||
make_atomic_cas(32)
|
||||
make_atomic_cas(64)
|
||||
make_atomic_cas(ptr)
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_add(8)
|
||||
make_atomic_add(16)
|
||||
#endif
|
||||
make_atomic_add(32)
|
||||
make_atomic_add(64)
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_load(8)
|
||||
make_atomic_load(16)
|
||||
#endif
|
||||
make_atomic_load(32)
|
||||
make_atomic_load(64)
|
||||
make_atomic_load(ptr)
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_fas(8)
|
||||
make_atomic_fas(16)
|
||||
#endif
|
||||
make_atomic_fas(32)
|
||||
make_atomic_fas(64)
|
||||
make_atomic_fas(ptr)
|
||||
|
||||
#ifdef MY_ATOMIC_HAS_8_16
|
||||
make_atomic_store(8)
|
||||
make_atomic_store(16)
|
||||
#endif
|
||||
make_atomic_store(32)
|
||||
make_atomic_store(64)
|
||||
make_atomic_store(ptr)
|
||||
|
||||
#ifdef _atomic_h_cleanup_
|
||||
#include _atomic_h_cleanup_
|
||||
#undef _atomic_h_cleanup_
|
||||
#endif
|
||||
|
||||
#undef U_8
|
||||
#undef U_16
|
||||
#undef U_32
|
||||
#undef U_64
|
||||
#undef U_ptr
|
||||
#undef Uv_8
|
||||
#undef Uv_16
|
||||
#undef Uv_32
|
||||
#undef Uv_64
|
||||
#undef Uv_ptr
|
||||
#undef a
|
||||
#undef cmp
|
||||
#undef v
|
||||
#undef set
|
||||
#undef U_a
|
||||
#undef U_cmp
|
||||
#undef U_v
|
||||
#undef U_set
|
||||
#undef make_atomic_add
|
||||
#undef make_atomic_cas
|
||||
#undef make_atomic_load
|
||||
#undef make_atomic_store
|
||||
#undef make_atomic_fas
|
||||
#undef make_atomic_add_body
|
||||
#undef make_atomic_cas_body
|
||||
#undef make_atomic_load_body
|
||||
#undef make_atomic_store_body
|
||||
#undef make_atomic_fas_body
|
||||
#undef intptr
|
||||
|
||||
/*
|
||||
the macro below defines (as an expression) the code that
|
||||
will be run in spin-loops. Intel manuals recummend to have PAUSE there.
|
||||
It is expected to be defined in include/atomic/ *.h files
|
||||
*/
|
||||
#ifndef LF_BACKOFF
|
||||
#define LF_BACKOFF (1)
|
||||
#endif
|
||||
|
||||
#define MY_ATOMIC_OK 0
|
||||
#define MY_ATOMIC_NOT_1CPU 1
|
||||
extern int my_atomic_initialize();
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* MY_ATOMIC_INCLUDED */
|
||||
572
deps/mysqllite/include/internal/my_base.h
vendored
572
deps/mysqllite/include/internal/my_base.h
vendored
@@ -1,572 +0,0 @@
|
||||
/* Copyright (C) 2000, 2011, Oracle and/or its affiliates. All rights
|
||||
reserved
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* This file includes constants used with all databases */
|
||||
|
||||
#ifndef _my_base_h
|
||||
#define _my_base_h
|
||||
|
||||
#ifndef stdin /* Included first in handler */
|
||||
#define CHSIZE_USED
|
||||
#include <my_global.h>
|
||||
#include <my_dir.h> /* This includes types */
|
||||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef EOVERFLOW
|
||||
#define EOVERFLOW 84
|
||||
#endif
|
||||
|
||||
#endif /* stdin */
|
||||
#include <my_list.h>
|
||||
|
||||
/* The following is bits in the flag parameter to ha_open() */
|
||||
|
||||
#define HA_OPEN_ABORT_IF_LOCKED 0 /* default */
|
||||
#define HA_OPEN_WAIT_IF_LOCKED 1
|
||||
#define HA_OPEN_IGNORE_IF_LOCKED 2
|
||||
#define HA_OPEN_TMP_TABLE 4 /* Table is a temp table */
|
||||
#define HA_OPEN_DELAY_KEY_WRITE 8 /* Don't update index */
|
||||
#define HA_OPEN_ABORT_IF_CRASHED 16
|
||||
#define HA_OPEN_FOR_REPAIR 32 /* open even if crashed */
|
||||
#define HA_OPEN_FROM_SQL_LAYER 64
|
||||
#define HA_OPEN_MMAP 128 /* open memory mapped */
|
||||
#define HA_OPEN_COPY 256 /* Open copy (for repair) */
|
||||
/* Internal temp table, used for temporary results */
|
||||
#define HA_OPEN_INTERNAL_TABLE 512
|
||||
|
||||
/* The following is parameter to ha_rkey() how to use key */
|
||||
|
||||
/*
|
||||
We define a complete-field prefix of a key value as a prefix where
|
||||
the last included field in the prefix contains the full field, not
|
||||
just some bytes from the start of the field. A partial-field prefix
|
||||
is allowed to contain only a few first bytes from the last included
|
||||
field.
|
||||
|
||||
Below HA_READ_KEY_EXACT, ..., HA_READ_BEFORE_KEY can take a
|
||||
complete-field prefix of a key value as the search
|
||||
key. HA_READ_PREFIX and HA_READ_PREFIX_LAST could also take a
|
||||
partial-field prefix, but currently (4.0.10) they are only used with
|
||||
complete-field prefixes. MySQL uses a padding trick to implement
|
||||
LIKE 'abc%' queries.
|
||||
|
||||
NOTE that in InnoDB HA_READ_PREFIX_LAST will NOT work with a
|
||||
partial-field prefix because InnoDB currently strips spaces from the
|
||||
end of varchar fields!
|
||||
*/
|
||||
|
||||
enum ha_rkey_function {
|
||||
HA_READ_KEY_EXACT, /* Find first record else error */
|
||||
HA_READ_KEY_OR_NEXT, /* Record or next record */
|
||||
HA_READ_KEY_OR_PREV, /* Record or previous */
|
||||
HA_READ_AFTER_KEY, /* Find next rec. after key-record */
|
||||
HA_READ_BEFORE_KEY, /* Find next rec. before key-record */
|
||||
HA_READ_PREFIX, /* Key which as same prefix */
|
||||
HA_READ_PREFIX_LAST, /* Last key with the same prefix */
|
||||
HA_READ_PREFIX_LAST_OR_PREV, /* Last or prev key with the same prefix */
|
||||
HA_READ_MBR_CONTAIN,
|
||||
HA_READ_MBR_INTERSECT,
|
||||
HA_READ_MBR_WITHIN,
|
||||
HA_READ_MBR_DISJOINT,
|
||||
HA_READ_MBR_EQUAL
|
||||
};
|
||||
|
||||
/* Key algorithm types */
|
||||
|
||||
enum ha_key_alg {
|
||||
HA_KEY_ALG_UNDEF= 0, /* Not specified (old file) */
|
||||
HA_KEY_ALG_BTREE= 1, /* B-tree, default one */
|
||||
HA_KEY_ALG_RTREE= 2, /* R-tree, for spatial searches */
|
||||
HA_KEY_ALG_HASH= 3, /* HASH keys (HEAP tables) */
|
||||
HA_KEY_ALG_FULLTEXT= 4 /* FULLTEXT (MyISAM tables) */
|
||||
};
|
||||
|
||||
/* Storage media types */
|
||||
|
||||
enum ha_storage_media {
|
||||
HA_SM_DEFAULT= 0, /* Not specified (engine default) */
|
||||
HA_SM_DISK= 1, /* DISK storage */
|
||||
HA_SM_MEMORY= 2 /* MAIN MEMORY storage */
|
||||
};
|
||||
|
||||
/* The following is parameter to ha_extra() */
|
||||
|
||||
enum ha_extra_function {
|
||||
HA_EXTRA_NORMAL=0, /* Optimize for space (def) */
|
||||
HA_EXTRA_QUICK=1, /* Optimize for speed */
|
||||
HA_EXTRA_NOT_USED=2,
|
||||
HA_EXTRA_CACHE=3, /* Cache record in HA_rrnd() */
|
||||
HA_EXTRA_NO_CACHE=4, /* End caching of records (def) */
|
||||
HA_EXTRA_NO_READCHECK=5, /* No readcheck on update */
|
||||
HA_EXTRA_READCHECK=6, /* Use readcheck (def) */
|
||||
HA_EXTRA_KEYREAD=7, /* Read only key to database */
|
||||
HA_EXTRA_NO_KEYREAD=8, /* Normal read of records (def) */
|
||||
HA_EXTRA_NO_USER_CHANGE=9, /* No user is allowed to write */
|
||||
HA_EXTRA_KEY_CACHE=10,
|
||||
HA_EXTRA_NO_KEY_CACHE=11,
|
||||
HA_EXTRA_WAIT_LOCK=12, /* Wait until file is avalably (def) */
|
||||
HA_EXTRA_NO_WAIT_LOCK=13, /* If file is locked, return quickly */
|
||||
HA_EXTRA_WRITE_CACHE=14, /* Use write cache in ha_write() */
|
||||
HA_EXTRA_FLUSH_CACHE=15, /* flush write_record_cache */
|
||||
HA_EXTRA_NO_KEYS=16, /* Remove all update of keys */
|
||||
HA_EXTRA_KEYREAD_CHANGE_POS=17, /* Keyread, but change pos */
|
||||
/* xxxxchk -r must be used */
|
||||
HA_EXTRA_REMEMBER_POS=18, /* Remember pos for next/prev */
|
||||
HA_EXTRA_RESTORE_POS=19,
|
||||
HA_EXTRA_REINIT_CACHE=20, /* init cache from current record */
|
||||
HA_EXTRA_FORCE_REOPEN=21, /* Datafile have changed on disk */
|
||||
HA_EXTRA_FLUSH, /* Flush tables to disk */
|
||||
HA_EXTRA_NO_ROWS, /* Don't write rows */
|
||||
HA_EXTRA_RESET_STATE, /* Reset positions */
|
||||
HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/
|
||||
HA_EXTRA_NO_IGNORE_DUP_KEY,
|
||||
HA_EXTRA_PREPARE_FOR_DROP,
|
||||
HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */
|
||||
HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */
|
||||
/*
|
||||
On-the-fly switching between unique and non-unique key inserting.
|
||||
*/
|
||||
HA_EXTRA_CHANGE_KEY_TO_UNIQUE,
|
||||
HA_EXTRA_CHANGE_KEY_TO_DUP,
|
||||
/*
|
||||
When using HA_EXTRA_KEYREAD, overwrite only key member fields and keep
|
||||
other fields intact. When this is off (by default) InnoDB will use memcpy
|
||||
to overwrite entire row.
|
||||
*/
|
||||
HA_EXTRA_KEYREAD_PRESERVE_FIELDS,
|
||||
HA_EXTRA_MMAP,
|
||||
/*
|
||||
Ignore if the a tuple is not found, continue processing the
|
||||
transaction and ignore that 'row'. Needed for idempotency
|
||||
handling on the slave
|
||||
|
||||
Currently only used by NDB storage engine. Partition handler ignores flag.
|
||||
*/
|
||||
HA_EXTRA_IGNORE_NO_KEY,
|
||||
HA_EXTRA_NO_IGNORE_NO_KEY,
|
||||
/*
|
||||
Mark the table as a log table. For some handlers (e.g. CSV) this results
|
||||
in a special locking for the table.
|
||||
*/
|
||||
HA_EXTRA_MARK_AS_LOG_TABLE,
|
||||
/*
|
||||
Informs handler that write_row() which tries to insert new row into the
|
||||
table and encounters some already existing row with same primary/unique
|
||||
key can replace old row with new row instead of reporting error (basically
|
||||
it informs handler that we do REPLACE instead of simple INSERT).
|
||||
Off by default.
|
||||
*/
|
||||
HA_EXTRA_WRITE_CAN_REPLACE,
|
||||
HA_EXTRA_WRITE_CANNOT_REPLACE,
|
||||
/*
|
||||
Inform handler that delete_row()/update_row() cannot batch deletes/updates
|
||||
and should perform them immediately. This may be needed when table has
|
||||
AFTER DELETE/UPDATE triggers which access to subject table.
|
||||
These flags are reset by the handler::extra(HA_EXTRA_RESET) call.
|
||||
*/
|
||||
HA_EXTRA_DELETE_CANNOT_BATCH,
|
||||
HA_EXTRA_UPDATE_CANNOT_BATCH,
|
||||
/*
|
||||
Inform handler that an "INSERT...ON DUPLICATE KEY UPDATE" will be
|
||||
executed. This condition is unset by HA_EXTRA_NO_IGNORE_DUP_KEY.
|
||||
*/
|
||||
HA_EXTRA_INSERT_WITH_UPDATE,
|
||||
/* Inform handler that we will do a rename */
|
||||
HA_EXTRA_PREPARE_FOR_RENAME,
|
||||
/*
|
||||
Special actions for MERGE tables.
|
||||
*/
|
||||
HA_EXTRA_ADD_CHILDREN_LIST,
|
||||
HA_EXTRA_ATTACH_CHILDREN,
|
||||
HA_EXTRA_IS_ATTACHED_CHILDREN,
|
||||
HA_EXTRA_DETACH_CHILDREN
|
||||
};
|
||||
|
||||
/* Compatible option, to be deleted in 6.0 */
|
||||
#define HA_EXTRA_PREPARE_FOR_DELETE HA_EXTRA_PREPARE_FOR_DROP
|
||||
|
||||
/* The following is parameter to ha_panic() */
|
||||
|
||||
enum ha_panic_function {
|
||||
HA_PANIC_CLOSE, /* Close all databases */
|
||||
HA_PANIC_WRITE, /* Unlock and write status */
|
||||
HA_PANIC_READ /* Lock and read keyinfo */
|
||||
};
|
||||
|
||||
/* The following is parameter to ha_create(); keytypes */
|
||||
|
||||
enum ha_base_keytype {
|
||||
HA_KEYTYPE_END=0,
|
||||
HA_KEYTYPE_TEXT=1, /* Key is sorted as letters */
|
||||
HA_KEYTYPE_BINARY=2, /* Key is sorted as unsigned chars */
|
||||
HA_KEYTYPE_SHORT_INT=3,
|
||||
HA_KEYTYPE_LONG_INT=4,
|
||||
HA_KEYTYPE_FLOAT=5,
|
||||
HA_KEYTYPE_DOUBLE=6,
|
||||
HA_KEYTYPE_NUM=7, /* Not packed num with pre-space */
|
||||
HA_KEYTYPE_USHORT_INT=8,
|
||||
HA_KEYTYPE_ULONG_INT=9,
|
||||
HA_KEYTYPE_LONGLONG=10,
|
||||
HA_KEYTYPE_ULONGLONG=11,
|
||||
HA_KEYTYPE_INT24=12,
|
||||
HA_KEYTYPE_UINT24=13,
|
||||
HA_KEYTYPE_INT8=14,
|
||||
/* Varchar (0-255 bytes) with length packed with 1 byte */
|
||||
HA_KEYTYPE_VARTEXT1=15, /* Key is sorted as letters */
|
||||
HA_KEYTYPE_VARBINARY1=16, /* Key is sorted as unsigned chars */
|
||||
/* Varchar (0-65535 bytes) with length packed with 2 bytes */
|
||||
HA_KEYTYPE_VARTEXT2=17, /* Key is sorted as letters */
|
||||
HA_KEYTYPE_VARBINARY2=18, /* Key is sorted as unsigned chars */
|
||||
HA_KEYTYPE_BIT=19
|
||||
};
|
||||
|
||||
#define HA_MAX_KEYTYPE 31 /* Must be log2-1 */
|
||||
|
||||
/* These flags kan be OR:ed to key-flag */
|
||||
|
||||
#define HA_NOSAME 1 /* Set if not dupplicated records */
|
||||
#define HA_PACK_KEY 2 /* Pack string key to previous key */
|
||||
#define HA_AUTO_KEY 16
|
||||
#define HA_BINARY_PACK_KEY 32 /* Packing of all keys to prev key */
|
||||
#define HA_FULLTEXT 128 /* For full-text search */
|
||||
#define HA_UNIQUE_CHECK 256 /* Check the key for uniqueness */
|
||||
#define HA_SPATIAL 1024 /* For spatial search */
|
||||
#define HA_NULL_ARE_EQUAL 2048 /* NULL in key are cmp as equal */
|
||||
#define HA_GENERATED_KEY 8192 /* Automaticly generated key */
|
||||
|
||||
/* The combination of the above can be used for key type comparison. */
|
||||
#define HA_KEYFLAG_MASK (HA_NOSAME | HA_PACK_KEY | HA_AUTO_KEY | \
|
||||
HA_BINARY_PACK_KEY | HA_FULLTEXT | HA_UNIQUE_CHECK | \
|
||||
HA_SPATIAL | HA_NULL_ARE_EQUAL | HA_GENERATED_KEY)
|
||||
|
||||
/*
|
||||
Key contains partial segments.
|
||||
|
||||
This flag is internal to the MySQL server by design. It is not supposed
|
||||
neither to be saved in FRM-files, nor to be passed to storage engines.
|
||||
It is intended to pass information into internal static sort_keys(KEY *,
|
||||
KEY *) function.
|
||||
|
||||
This flag can be calculated -- it's based on key lengths comparison.
|
||||
*/
|
||||
#define HA_KEY_HAS_PART_KEY_SEG 65536
|
||||
|
||||
/* Automatic bits in key-flag */
|
||||
|
||||
#define HA_SPACE_PACK_USED 4 /* Test for if SPACE_PACK used */
|
||||
#define HA_VAR_LENGTH_KEY 8
|
||||
#define HA_NULL_PART_KEY 64
|
||||
#define HA_USES_COMMENT 4096
|
||||
#define HA_USES_PARSER 16384 /* Fulltext index uses [pre]parser */
|
||||
#define HA_USES_BLOCK_SIZE ((uint) 32768)
|
||||
#define HA_SORT_ALLOWS_SAME 512 /* Intern bit when sorting records */
|
||||
|
||||
/* These flags can be added to key-seg-flag */
|
||||
|
||||
#define HA_SPACE_PACK 1 /* Pack space in key-seg */
|
||||
#define HA_PART_KEY_SEG 4 /* Used by MySQL for part-key-cols */
|
||||
#define HA_VAR_LENGTH_PART 8
|
||||
#define HA_NULL_PART 16
|
||||
#define HA_BLOB_PART 32
|
||||
#define HA_SWAP_KEY 64
|
||||
#define HA_REVERSE_SORT 128 /* Sort key in reverse order */
|
||||
#define HA_NO_SORT 256 /* do not bother sorting on this keyseg */
|
||||
/*
|
||||
End space in unique/varchar are considered equal. (Like 'a' and 'a ')
|
||||
Only needed for internal temporary tables.
|
||||
*/
|
||||
#define HA_END_SPACE_ARE_EQUAL 512
|
||||
#define HA_BIT_PART 1024
|
||||
|
||||
/* optionbits for database */
|
||||
#define HA_OPTION_PACK_RECORD 1
|
||||
#define HA_OPTION_PACK_KEYS 2
|
||||
#define HA_OPTION_COMPRESS_RECORD 4
|
||||
#define HA_OPTION_LONG_BLOB_PTR 8 /* new ISAM format */
|
||||
#define HA_OPTION_TMP_TABLE 16
|
||||
#define HA_OPTION_CHECKSUM 32
|
||||
#define HA_OPTION_DELAY_KEY_WRITE 64
|
||||
#define HA_OPTION_NO_PACK_KEYS 128 /* Reserved for MySQL */
|
||||
#define HA_OPTION_CREATE_FROM_ENGINE 256
|
||||
#define HA_OPTION_RELIES_ON_SQL_LAYER 512
|
||||
#define HA_OPTION_NULL_FIELDS 1024
|
||||
#define HA_OPTION_PAGE_CHECKSUM 2048
|
||||
#define HA_OPTION_TEMP_COMPRESS_RECORD ((uint) 16384) /* set by isamchk */
|
||||
#define HA_OPTION_READ_ONLY_DATA ((uint) 32768) /* Set by isamchk */
|
||||
|
||||
/* Bits in flag to create() */
|
||||
|
||||
#define HA_DONT_TOUCH_DATA 1 /* Don't empty datafile (isamchk) */
|
||||
#define HA_PACK_RECORD 2 /* Request packed record format */
|
||||
#define HA_CREATE_TMP_TABLE 4
|
||||
#define HA_CREATE_CHECKSUM 8
|
||||
#define HA_CREATE_KEEP_FILES 16 /* don't overwrite .MYD and MYI */
|
||||
#define HA_CREATE_PAGE_CHECKSUM 32
|
||||
#define HA_CREATE_DELAY_KEY_WRITE 64
|
||||
#define HA_CREATE_RELIES_ON_SQL_LAYER 128
|
||||
|
||||
/*
|
||||
The following flags (OR-ed) are passed to handler::info() method.
|
||||
The method copies misc handler information out of the storage engine
|
||||
to data structures accessible from MySQL
|
||||
|
||||
Same flags are also passed down to mi_status, myrg_status, etc.
|
||||
*/
|
||||
|
||||
/* this one is not used */
|
||||
#define HA_STATUS_POS 1
|
||||
/*
|
||||
assuming the table keeps shared actual copy of the 'info' and
|
||||
local, possibly outdated copy, the following flag means that
|
||||
it should not try to get the actual data (locking the shared structure)
|
||||
slightly outdated version will suffice
|
||||
*/
|
||||
#define HA_STATUS_NO_LOCK 2
|
||||
/* update the time of the last modification (in handler::update_time) */
|
||||
#define HA_STATUS_TIME 4
|
||||
/*
|
||||
update the 'constant' part of the info:
|
||||
handler::max_data_file_length, max_index_file_length, create_time
|
||||
sortkey, ref_length, block_size, data_file_name, index_file_name.
|
||||
handler::table->s->keys_in_use, keys_for_keyread, rec_per_key
|
||||
*/
|
||||
#define HA_STATUS_CONST 8
|
||||
/*
|
||||
update the 'variable' part of the info:
|
||||
handler::records, deleted, data_file_length, index_file_length,
|
||||
check_time, mean_rec_length
|
||||
*/
|
||||
#define HA_STATUS_VARIABLE 16
|
||||
/*
|
||||
get the information about the key that caused last duplicate value error
|
||||
update handler::errkey and handler::dupp_ref
|
||||
see handler::get_dup_key()
|
||||
*/
|
||||
#define HA_STATUS_ERRKEY 32
|
||||
/*
|
||||
update handler::auto_increment_value
|
||||
*/
|
||||
#define HA_STATUS_AUTO 64
|
||||
/*
|
||||
Get also delete_length when HA_STATUS_VARIABLE is called. It's ok to set it also
|
||||
when only HA_STATUS_VARIABLE but it won't be used.
|
||||
*/
|
||||
#define HA_STATUS_VARIABLE_EXTRA 128
|
||||
|
||||
/*
|
||||
Errorcodes given by handler functions
|
||||
|
||||
opt_sum_query() assumes these codes are > 1
|
||||
Do not add error numbers before HA_ERR_FIRST.
|
||||
If necessary to add lower numbers, change HA_ERR_FIRST accordingly.
|
||||
*/
|
||||
#define HA_ERR_FIRST 120 /* Copy of first error nr.*/
|
||||
|
||||
#define HA_ERR_KEY_NOT_FOUND 120 /* Didn't find key on read or update */
|
||||
#define HA_ERR_FOUND_DUPP_KEY 121 /* Dupplicate key on write */
|
||||
#define HA_ERR_INTERNAL_ERROR 122 /* Internal error */
|
||||
#define HA_ERR_RECORD_CHANGED 123 /* Uppdate with is recoverable */
|
||||
#define HA_ERR_WRONG_INDEX 124 /* Wrong index given to function */
|
||||
#define HA_ERR_CRASHED 126 /* Indexfile is crashed */
|
||||
#define HA_ERR_WRONG_IN_RECORD 127 /* Record-file is crashed */
|
||||
#define HA_ERR_OUT_OF_MEM 128 /* Record-file is crashed */
|
||||
#define HA_ERR_NOT_A_TABLE 130 /* not a MYI file - no signature */
|
||||
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
|
||||
#define HA_ERR_OLD_FILE 132 /* old databasfile */
|
||||
#define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */
|
||||
#define HA_ERR_RECORD_DELETED 134 /* A record is not there */
|
||||
#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
|
||||
#define HA_ERR_INDEX_FILE_FULL 136 /* No more room in file */
|
||||
#define HA_ERR_END_OF_FILE 137 /* end in next/prev/first/last */
|
||||
#define HA_ERR_UNSUPPORTED 138 /* unsupported extension used */
|
||||
#define HA_ERR_TO_BIG_ROW 139 /* Too big row */
|
||||
#define HA_WRONG_CREATE_OPTION 140 /* Wrong create option */
|
||||
#define HA_ERR_FOUND_DUPP_UNIQUE 141 /* Dupplicate unique on write */
|
||||
#define HA_ERR_UNKNOWN_CHARSET 142 /* Can't open charset */
|
||||
#define HA_ERR_WRONG_MRG_TABLE_DEF 143 /* conflicting tables in MERGE */
|
||||
#define HA_ERR_CRASHED_ON_REPAIR 144 /* Last (automatic?) repair failed */
|
||||
#define HA_ERR_CRASHED_ON_USAGE 145 /* Table must be repaired */
|
||||
#define HA_ERR_LOCK_WAIT_TIMEOUT 146
|
||||
#define HA_ERR_LOCK_TABLE_FULL 147
|
||||
#define HA_ERR_READ_ONLY_TRANSACTION 148 /* Updates not allowed */
|
||||
#define HA_ERR_LOCK_DEADLOCK 149
|
||||
#define HA_ERR_CANNOT_ADD_FOREIGN 150 /* Cannot add a foreign key constr. */
|
||||
#define HA_ERR_NO_REFERENCED_ROW 151 /* Cannot add a child row */
|
||||
#define HA_ERR_ROW_IS_REFERENCED 152 /* Cannot delete a parent row */
|
||||
#define HA_ERR_NO_SAVEPOINT 153 /* No savepoint with that name */
|
||||
#define HA_ERR_NON_UNIQUE_BLOCK_SIZE 154 /* Non unique key block size */
|
||||
#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
|
||||
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
|
||||
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
|
||||
/* NULLs are not supported in spatial index */
|
||||
#define HA_ERR_NULL_IN_SPATIAL 158
|
||||
#define HA_ERR_TABLE_DEF_CHANGED 159 /* The table changed in storage engine */
|
||||
/* There's no partition in table for given value */
|
||||
#define HA_ERR_NO_PARTITION_FOUND 160
|
||||
#define HA_ERR_RBR_LOGGING_FAILED 161 /* Row-based binlogging of row failed */
|
||||
#define HA_ERR_DROP_INDEX_FK 162 /* Index needed in foreign key constr */
|
||||
/*
|
||||
Upholding foreign key constraints would lead to a duplicate key error
|
||||
in some other table.
|
||||
*/
|
||||
#define HA_ERR_FOREIGN_DUPLICATE_KEY 163
|
||||
/* The table changed in storage engine */
|
||||
#define HA_ERR_TABLE_NEEDS_UPGRADE 164
|
||||
#define HA_ERR_TABLE_READONLY 165 /* The table is not writable */
|
||||
|
||||
#define HA_ERR_AUTOINC_READ_FAILED 166 /* Failed to get next autoinc value */
|
||||
#define HA_ERR_AUTOINC_ERANGE 167 /* Failed to set row autoinc value */
|
||||
#define HA_ERR_GENERIC 168 /* Generic error */
|
||||
/* row not actually updated: new values same as the old values */
|
||||
#define HA_ERR_RECORD_IS_THE_SAME 169
|
||||
/* It is not possible to log this statement */
|
||||
#define HA_ERR_LOGGING_IMPOSSIBLE 170 /* It is not possible to log this
|
||||
statement */
|
||||
#define HA_ERR_CORRUPT_EVENT 171 /* The event was corrupt, leading to
|
||||
illegal data being read */
|
||||
#define HA_ERR_NEW_FILE 172 /* New file format */
|
||||
#define HA_ERR_ROWS_EVENT_APPLY 173 /* The event could not be processed
|
||||
no other hanlder error happened */
|
||||
#define HA_ERR_INITIALIZATION 174 /* Error during initialization */
|
||||
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
|
||||
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
|
||||
#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
|
||||
#define HA_ERR_LAST 177 /* Copy of last error nr */
|
||||
|
||||
/* Number of different errors */
|
||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||
|
||||
/* Other constants */
|
||||
|
||||
#define HA_NAMELEN 64 /* Max length of saved filename */
|
||||
#define NO_SUCH_KEY (~(uint)0) /* used as a key no. */
|
||||
|
||||
typedef ulong key_part_map;
|
||||
#define HA_WHOLE_KEY (~(key_part_map)0)
|
||||
|
||||
/* Intern constants in databases */
|
||||
|
||||
/* bits in _search */
|
||||
#define SEARCH_FIND 1
|
||||
#define SEARCH_NO_FIND 2
|
||||
#define SEARCH_SAME 4
|
||||
#define SEARCH_BIGGER 8
|
||||
#define SEARCH_SMALLER 16
|
||||
#define SEARCH_SAVE_BUFF 32
|
||||
#define SEARCH_UPDATE 64
|
||||
#define SEARCH_PREFIX 128
|
||||
#define SEARCH_LAST 256
|
||||
#define MBR_CONTAIN 512
|
||||
#define MBR_INTERSECT 1024
|
||||
#define MBR_WITHIN 2048
|
||||
#define MBR_DISJOINT 4096
|
||||
#define MBR_EQUAL 8192
|
||||
#define MBR_DATA 16384
|
||||
#define SEARCH_NULL_ARE_EQUAL 32768 /* NULL in keys are equal */
|
||||
#define SEARCH_NULL_ARE_NOT_EQUAL 65536 /* NULL in keys are not equal */
|
||||
|
||||
/* bits in opt_flag */
|
||||
#define QUICK_USED 1
|
||||
#define READ_CACHE_USED 2
|
||||
#define READ_CHECK_USED 4
|
||||
#define KEY_READ_USED 8
|
||||
#define WRITE_CACHE_USED 16
|
||||
#define OPT_NO_ROWS 32
|
||||
|
||||
/* bits in update */
|
||||
#define HA_STATE_CHANGED 1 /* Database has changed */
|
||||
#define HA_STATE_AKTIV 2 /* Has a current record */
|
||||
#define HA_STATE_WRITTEN 4 /* Record is written */
|
||||
#define HA_STATE_DELETED 8
|
||||
#define HA_STATE_NEXT_FOUND 16 /* Next found record (record before) */
|
||||
#define HA_STATE_PREV_FOUND 32 /* Prev found record (record after) */
|
||||
#define HA_STATE_NO_KEY 64 /* Last read didn't find record */
|
||||
#define HA_STATE_KEY_CHANGED 128
|
||||
#define HA_STATE_WRITE_AT_END 256 /* set in _ps_find_writepos */
|
||||
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
|
||||
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
|
||||
#define HA_STATE_EXTEND_BLOCK 2048
|
||||
#define HA_STATE_RNEXT_SAME 4096 /* rnext_same occupied lastkey2 */
|
||||
|
||||
/* myisampack expects no more than 32 field types. */
|
||||
enum en_fieldtype {
|
||||
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
|
||||
FIELD_SKIP_ZERO,FIELD_BLOB,FIELD_CONSTANT,FIELD_INTERVALL,FIELD_ZERO,
|
||||
FIELD_VARCHAR,FIELD_CHECK,
|
||||
FIELD_enum_val_count
|
||||
};
|
||||
|
||||
enum data_file_type {
|
||||
STATIC_RECORD, DYNAMIC_RECORD, COMPRESSED_RECORD, BLOCK_RECORD
|
||||
};
|
||||
|
||||
/* For key ranges */
|
||||
|
||||
#define NO_MIN_RANGE 1
|
||||
#define NO_MAX_RANGE 2
|
||||
#define NEAR_MIN 4
|
||||
#define NEAR_MAX 8
|
||||
#define UNIQUE_RANGE 16
|
||||
#define EQ_RANGE 32
|
||||
#define NULL_RANGE 64
|
||||
#define GEOM_FLAG 128
|
||||
#define SKIP_RANGE 256
|
||||
|
||||
typedef struct st_key_range
|
||||
{
|
||||
const uchar *key;
|
||||
uint length;
|
||||
key_part_map keypart_map;
|
||||
enum ha_rkey_function flag;
|
||||
} key_range;
|
||||
|
||||
typedef struct st_key_multi_range
|
||||
{
|
||||
key_range start_key;
|
||||
key_range end_key;
|
||||
char *ptr; /* Free to use by caller (ptr to row etc) */
|
||||
uint range_flag; /* key range flags see above */
|
||||
} KEY_MULTI_RANGE;
|
||||
|
||||
|
||||
/* For number of records */
|
||||
#ifdef BIG_TABLES
|
||||
#define rows2double(A) ulonglong2double(A)
|
||||
typedef my_off_t ha_rows;
|
||||
#else
|
||||
#define rows2double(A) (double) (A)
|
||||
typedef ulong ha_rows;
|
||||
#endif
|
||||
|
||||
#define HA_POS_ERROR (~ (ha_rows) 0)
|
||||
#define HA_OFFSET_ERROR (~ (my_off_t) 0)
|
||||
|
||||
#if SYSTEM_SIZEOF_OFF_T == 4
|
||||
#define MAX_FILE_SIZE INT_MAX32
|
||||
#else
|
||||
#define MAX_FILE_SIZE LONGLONG_MAX
|
||||
#endif
|
||||
|
||||
#define HA_VARCHAR_PACKLENGTH(field_length) ((field_length) < 256 ? 1 :2)
|
||||
|
||||
/* invalidator function reference for Query Cache */
|
||||
C_MODE_START
|
||||
typedef void (* invalidator_by_filename)(const char * filename);
|
||||
C_MODE_END
|
||||
|
||||
#endif /* _my_base_h */
|
||||
105
deps/mysqllite/include/internal/my_bit.h
vendored
105
deps/mysqllite/include/internal/my_bit.h
vendored
@@ -1,105 +0,0 @@
|
||||
#ifndef MY_BIT_INCLUDED
|
||||
#define MY_BIT_INCLUDED
|
||||
|
||||
/*
|
||||
Some useful bit functions
|
||||
*/
|
||||
|
||||
C_MODE_START
|
||||
|
||||
extern const char _my_bits_nbits[256];
|
||||
extern const uchar _my_bits_reverse_table[256];
|
||||
|
||||
/*
|
||||
Find smallest X in 2^X >= value
|
||||
This can be used to divide a number with value by doing a shift instead
|
||||
*/
|
||||
|
||||
static inline uint my_bit_log2(ulong value)
|
||||
{
|
||||
uint bit;
|
||||
for (bit=0 ; value > 1 ; value>>=1, bit++) ;
|
||||
return bit;
|
||||
}
|
||||
|
||||
static inline uint my_count_bits(ulonglong v)
|
||||
{
|
||||
#if SIZEOF_LONG_LONG > 4
|
||||
/* The following code is a bit faster on 16 bit machines than if we would
|
||||
only shift v */
|
||||
ulong v2=(ulong) (v >> 32);
|
||||
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
|
||||
_my_bits_nbits[(uchar) (v >> 8)] +
|
||||
_my_bits_nbits[(uchar) (v >> 16)] +
|
||||
_my_bits_nbits[(uchar) (v >> 24)] +
|
||||
_my_bits_nbits[(uchar) (v2)] +
|
||||
_my_bits_nbits[(uchar) (v2 >> 8)] +
|
||||
_my_bits_nbits[(uchar) (v2 >> 16)] +
|
||||
_my_bits_nbits[(uchar) (v2 >> 24)]);
|
||||
#else
|
||||
return (uint) (uchar) (_my_bits_nbits[(uchar) v] +
|
||||
_my_bits_nbits[(uchar) (v >> 8)] +
|
||||
_my_bits_nbits[(uchar) (v >> 16)] +
|
||||
_my_bits_nbits[(uchar) (v >> 24)]);
|
||||
#endif
|
||||
}
|
||||
|
||||
static inline uint my_count_bits_ushort(ushort v)
|
||||
{
|
||||
return _my_bits_nbits[v];
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Next highest power of two
|
||||
|
||||
SYNOPSIS
|
||||
my_round_up_to_next_power()
|
||||
v Value to check
|
||||
|
||||
RETURN
|
||||
Next or equal power of 2
|
||||
Note: 0 will return 0
|
||||
|
||||
NOTES
|
||||
Algorithm by Sean Anderson, according to:
|
||||
http://graphics.stanford.edu/~seander/bithacks.html
|
||||
(Orignal code public domain)
|
||||
|
||||
Comments shows how this works with 01100000000000000000000000001011
|
||||
*/
|
||||
|
||||
static inline uint32 my_round_up_to_next_power(uint32 v)
|
||||
{
|
||||
v--; /* 01100000000000000000000000001010 */
|
||||
v|= v >> 1; /* 01110000000000000000000000001111 */
|
||||
v|= v >> 2; /* 01111100000000000000000000001111 */
|
||||
v|= v >> 4; /* 01111111110000000000000000001111 */
|
||||
v|= v >> 8; /* 01111111111111111100000000001111 */
|
||||
v|= v >> 16; /* 01111111111111111111111111111111 */
|
||||
return v+1; /* 10000000000000000000000000000000 */
|
||||
}
|
||||
|
||||
static inline uint32 my_clear_highest_bit(uint32 v)
|
||||
{
|
||||
uint32 w=v >> 1;
|
||||
w|= w >> 1;
|
||||
w|= w >> 2;
|
||||
w|= w >> 4;
|
||||
w|= w >> 8;
|
||||
w|= w >> 16;
|
||||
return v & w;
|
||||
}
|
||||
|
||||
static inline uint32 my_reverse_bits(uint32 key)
|
||||
{
|
||||
return
|
||||
(_my_bits_reverse_table[ key & 255] << 24) |
|
||||
(_my_bits_reverse_table[(key>> 8) & 255] << 16) |
|
||||
(_my_bits_reverse_table[(key>>16) & 255] << 8) |
|
||||
_my_bits_reverse_table[(key>>24) ];
|
||||
}
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* MY_BIT_INCLUDED */
|
||||
142
deps/mysqllite/include/internal/my_bitmap.h
vendored
142
deps/mysqllite/include/internal/my_bitmap.h
vendored
@@ -1,142 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_bitmap_h_
|
||||
#define _my_bitmap_h_
|
||||
|
||||
#define MY_BIT_NONE (~(uint) 0)
|
||||
|
||||
#include <m_string.h>
|
||||
|
||||
typedef uint32 my_bitmap_map;
|
||||
|
||||
typedef struct st_bitmap
|
||||
{
|
||||
my_bitmap_map *bitmap;
|
||||
uint n_bits; /* number of bits occupied by the above */
|
||||
my_bitmap_map last_word_mask;
|
||||
my_bitmap_map *last_word_ptr;
|
||||
/*
|
||||
mutex will be acquired for the duration of each bitmap operation if
|
||||
thread_safe flag in bitmap_init was set. Otherwise, we optimize by not
|
||||
acquiring the mutex
|
||||
*/
|
||||
mysql_mutex_t *mutex;
|
||||
} MY_BITMAP;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
extern void create_last_word_mask(MY_BITMAP *map);
|
||||
extern my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
|
||||
my_bool thread_safe);
|
||||
extern my_bool bitmap_is_clear_all(const MY_BITMAP *map);
|
||||
extern my_bool bitmap_is_prefix(const MY_BITMAP *map, uint prefix_size);
|
||||
extern my_bool bitmap_is_set_all(const MY_BITMAP *map);
|
||||
extern my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2);
|
||||
extern my_bool bitmap_is_overlapping(const MY_BITMAP *map1,
|
||||
const MY_BITMAP *map2);
|
||||
extern my_bool bitmap_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
||||
extern my_bool bitmap_test_and_clear(MY_BITMAP *map, uint bitmap_bit);
|
||||
extern my_bool bitmap_fast_test_and_set(MY_BITMAP *map, uint bitmap_bit);
|
||||
extern uint bitmap_set_next(MY_BITMAP *map);
|
||||
extern uint bitmap_get_first(const MY_BITMAP *map);
|
||||
extern uint bitmap_get_first_set(const MY_BITMAP *map);
|
||||
extern uint bitmap_bits_set(const MY_BITMAP *map);
|
||||
extern void bitmap_free(MY_BITMAP *map);
|
||||
extern void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit);
|
||||
extern void bitmap_set_prefix(MY_BITMAP *map, uint prefix_size);
|
||||
extern void bitmap_intersect(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_union(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
extern void bitmap_invert(MY_BITMAP *map);
|
||||
extern void bitmap_copy(MY_BITMAP *map, const MY_BITMAP *map2);
|
||||
|
||||
extern uint bitmap_lock_set_next(MY_BITMAP *map);
|
||||
extern void bitmap_lock_clear_bit(MY_BITMAP *map, uint bitmap_bit);
|
||||
/* Fast, not thread safe, bitmap functions */
|
||||
#define bitmap_buffer_size(bits) (((bits)+31)/32)*4
|
||||
#define no_bytes_in_map(map) (((map)->n_bits + 7)/8)
|
||||
#define no_words_in_map(map) (((map)->n_bits + 31)/32)
|
||||
#define bytes_word_aligned(bytes) (4*((bytes + 3)/4))
|
||||
#define _bitmap_set_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
|
||||
|= (1 << ((BIT) & 7)))
|
||||
#define _bitmap_flip_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
|
||||
^= (1 << ((BIT) & 7)))
|
||||
#define _bitmap_clear_bit(MAP, BIT) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
|
||||
&= ~ (1 << ((BIT) & 7)))
|
||||
#define _bitmap_is_set(MAP, BIT) (uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
|
||||
& (1 << ((BIT) & 7)))
|
||||
/*
|
||||
WARNING!
|
||||
|
||||
The below symbols are inline functions in DEBUG builds and macros in
|
||||
non-DEBUG builds. The latter evaluate their 'bit' argument twice.
|
||||
|
||||
NEVER use an increment/decrement operator with the 'bit' argument.
|
||||
It would work with DEBUG builds, but fails later in production builds!
|
||||
|
||||
FORBIDDEN: bitmap_set_bit($my_bitmap, (field++)->field_index);
|
||||
*/
|
||||
#ifndef DBUG_OFF
|
||||
static inline void
|
||||
bitmap_set_bit(MY_BITMAP *map,uint bit)
|
||||
{
|
||||
DBUG_ASSERT(bit < (map)->n_bits);
|
||||
_bitmap_set_bit(map,bit);
|
||||
}
|
||||
static inline void
|
||||
bitmap_flip_bit(MY_BITMAP *map,uint bit)
|
||||
{
|
||||
DBUG_ASSERT(bit < (map)->n_bits);
|
||||
_bitmap_flip_bit(map,bit);
|
||||
}
|
||||
static inline void
|
||||
bitmap_clear_bit(MY_BITMAP *map,uint bit)
|
||||
{
|
||||
DBUG_ASSERT(bit < (map)->n_bits);
|
||||
_bitmap_clear_bit(map,bit);
|
||||
}
|
||||
static inline uint
|
||||
bitmap_is_set(const MY_BITMAP *map,uint bit)
|
||||
{
|
||||
DBUG_ASSERT(bit < (map)->n_bits);
|
||||
return _bitmap_is_set(map,bit);
|
||||
}
|
||||
#else
|
||||
#define bitmap_set_bit(MAP, BIT) _bitmap_set_bit(MAP, BIT)
|
||||
#define bitmap_flip_bit(MAP, BIT) _bitmap_flip_bit(MAP, BIT)
|
||||
#define bitmap_clear_bit(MAP, BIT) _bitmap_clear_bit(MAP, BIT)
|
||||
#define bitmap_is_set(MAP, BIT) _bitmap_is_set(MAP, BIT)
|
||||
#endif
|
||||
|
||||
static inline my_bool bitmap_cmp(const MY_BITMAP *map1, const MY_BITMAP *map2)
|
||||
{
|
||||
*(map1)->last_word_ptr|= (map1)->last_word_mask;
|
||||
*(map2)->last_word_ptr|= (map2)->last_word_mask;
|
||||
return memcmp((map1)->bitmap, (map2)->bitmap, 4*no_words_in_map((map1)))==0;
|
||||
}
|
||||
|
||||
#define bitmap_clear_all(MAP) \
|
||||
{ memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); }
|
||||
#define bitmap_set_all(MAP) \
|
||||
(memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _my_bitmap_h_ */
|
||||
130
deps/mysqllite/include/internal/my_handler.h
vendored
130
deps/mysqllite/include/internal/my_handler.h
vendored
@@ -1,130 +0,0 @@
|
||||
/* Copyright (C) 2002-2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Library General Public
|
||||
License as published by the Free Software Foundation; version 2
|
||||
of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Library General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Library General Public
|
||||
License along with this library; if not, write to the Free
|
||||
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||
MA 02111-1307, USA */
|
||||
|
||||
#ifndef _my_handler_h
|
||||
#define _my_handler_h
|
||||
|
||||
#include "myisampack.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "m_ctype.h" /* CHARSET_INFO */
|
||||
|
||||
/*
|
||||
There is a hard limit for the maximum number of keys as there are only
|
||||
8 bits in the index file header for the number of keys in a table.
|
||||
This means that 0..255 keys can exist for a table. The idea of
|
||||
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
|
||||
a MyISAM table for which one has more keys than MyISAM is normally
|
||||
compiled for. If you don't have this, you will get a core dump when
|
||||
running myisamchk compiled for 128 keys on a table with 255 keys.
|
||||
*/
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
|
||||
/*
|
||||
The following defines can be increased if necessary.
|
||||
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
|
||||
*/
|
||||
|
||||
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
|
||||
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
|
||||
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
|
||||
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
|
||||
|
||||
typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
{
|
||||
CHARSET_INFO *charset;
|
||||
uint32 start; /* Start of key in record */
|
||||
uint32 null_pos; /* position to NULL indicator */
|
||||
uint16 bit_pos; /* Position to bit part */
|
||||
uint16 flag;
|
||||
uint16 length; /* Keylength */
|
||||
uint16 language;
|
||||
uint8 type; /* Type of key (for sort) */
|
||||
uint8 null_bit; /* bitmask to test for NULL */
|
||||
uint8 bit_start,bit_end; /* if bit field */
|
||||
uint8 bit_length; /* Length of bit part */
|
||||
} HA_KEYSEG;
|
||||
|
||||
#define get_key_length(length,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
length= (uint) *(uchar*) ((key)++); \
|
||||
else \
|
||||
{ length= mi_uint2korr((key)+1); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define get_key_length_rdonly(length,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
length= ((uint) *(uchar*) ((key))); \
|
||||
else \
|
||||
{ length= mi_uint2korr((key)+1); } \
|
||||
}
|
||||
|
||||
#define get_key_pack_length(length,length_pack,key) \
|
||||
{ if (*(uchar*) (key) != 255) \
|
||||
{ length= (uint) *(uchar*) ((key)++); length_pack= 1; }\
|
||||
else \
|
||||
{ length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \
|
||||
}
|
||||
|
||||
#define store_key_length_inc(key,length) \
|
||||
{ if ((length) < 255) \
|
||||
{ *(key)++= (length); } \
|
||||
else \
|
||||
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
|
||||
}
|
||||
|
||||
#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
|
||||
|
||||
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
|
||||
((1 << (bit_len)) - 1))
|
||||
|
||||
#define set_rec_bits(bits, bit_ptr, bit_ofs, bit_len) \
|
||||
{ \
|
||||
(bit_ptr)[0]= ((bit_ptr)[0] & ~(((1 << (bit_len)) - 1) << (bit_ofs))) | \
|
||||
((bits) << (bit_ofs)); \
|
||||
if ((bit_ofs) + (bit_len) > 8) \
|
||||
(bit_ptr)[1]= ((bit_ptr)[1] & ~((1 << ((bit_len) - 8 + (bit_ofs))) - 1)) | \
|
||||
((bits) >> (8 - (bit_ofs))); \
|
||||
}
|
||||
|
||||
#define clr_rec_bits(bit_ptr, bit_ofs, bit_len) \
|
||||
set_rec_bits(0, bit_ptr, bit_ofs, bit_len)
|
||||
|
||||
extern int ha_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
||||
my_bool, my_bool);
|
||||
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
||||
register uchar *b, uint key_length, uint nextflag,
|
||||
uint *diff_pos);
|
||||
|
||||
extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a);
|
||||
extern void my_handler_error_register(void);
|
||||
extern void my_handler_error_unregister(void);
|
||||
/*
|
||||
Inside an in-memory data record, memory pointers to pieces of the
|
||||
record (like BLOBs) are stored in their native byte order and in
|
||||
this amount of bytes.
|
||||
*/
|
||||
#define portable_sizeof_char_ptr 8
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _my_handler_h */
|
||||
31
deps/mysqllite/include/internal/my_libwrap.h
vendored
31
deps/mysqllite/include/internal/my_libwrap.h
vendored
@@ -1,31 +0,0 @@
|
||||
#ifndef MY_LIBWRAP_INCLUDED
|
||||
#define MY_LIBWRAP_INCLUDED
|
||||
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifdef HAVE_LIBWRAP
|
||||
#include <tcpd.h>
|
||||
#include <syslog.h>
|
||||
#ifdef NEED_SYS_SYSLOG_H
|
||||
#include <sys/syslog.h>
|
||||
#endif /* NEED_SYS_SYSLOG_H */
|
||||
|
||||
extern void my_fromhost(struct request_info *req);
|
||||
extern int my_hosts_access(struct request_info *req);
|
||||
extern char *my_eval_client(struct request_info *req);
|
||||
|
||||
#endif /* HAVE_LIBWRAP */
|
||||
#endif /* MY_LIBWRAP_INCLUDED */
|
||||
59
deps/mysqllite/include/internal/my_md5.h
vendored
59
deps/mysqllite/include/internal/my_md5.h
vendored
@@ -1,59 +0,0 @@
|
||||
#ifndef MY_MD5_INCLUDED
|
||||
#define MY_MD5_INCLUDED
|
||||
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* See md5.c for explanation and copyright information. */
|
||||
|
||||
/*
|
||||
* $FreeBSD: src/contrib/cvs/lib/md5.h,v 1.2 1999/12/11 15:10:02 peter Exp $
|
||||
*/
|
||||
|
||||
/* Unlike previous versions of this code, uint32 need not be exactly
|
||||
32 bits, merely 32 bits or more. Choosing a data type which is 32
|
||||
bits instead of 64 is not important; speed is considerably more
|
||||
important. ANSI guarantees that "unsigned long" will be big enough,
|
||||
and always using it seems to have few disadvantages. */
|
||||
typedef uint32 cvs_uint32;
|
||||
|
||||
typedef struct {
|
||||
cvs_uint32 buf[4];
|
||||
cvs_uint32 bits[2];
|
||||
unsigned char in[64];
|
||||
} my_MD5Context;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void my_MD5Init (my_MD5Context *context);
|
||||
void my_MD5Update (my_MD5Context *context,
|
||||
unsigned char const *buf, unsigned len);
|
||||
void my_MD5Final (unsigned char digest[16],
|
||||
my_MD5Context *context);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MY_MD5_HASH(digest,buf,len) \
|
||||
do { \
|
||||
my_MD5Context ctx; \
|
||||
my_MD5Init (&ctx); \
|
||||
my_MD5Update (&ctx, buf, len); \
|
||||
my_MD5Final (digest, &ctx); \
|
||||
} while (0)
|
||||
|
||||
#endif /* MY_MD__INCLUDED */
|
||||
52
deps/mysqllite/include/internal/my_nosys.h
vendored
52
deps/mysqllite/include/internal/my_nosys.h
vendored
@@ -1,52 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Header to remove use of my_functions in functions where we need speed and
|
||||
where calls to posix functions should work
|
||||
*/
|
||||
#ifndef _my_nosys_h
|
||||
#define _my_nosys_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef __MY_NOSYS__
|
||||
#define __MY_NOSYS__
|
||||
|
||||
#ifndef HAVE_STDLIB_H
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#undef my_read
|
||||
#undef my_write
|
||||
#undef my_seek
|
||||
#define my_read(a,b,c,d) my_quick_read(a,b,c,d)
|
||||
#define my_write(a,b,c,d) my_quick_write(a,b,c)
|
||||
extern size_t my_quick_read(File Filedes,uchar *Buffer,size_t Count,
|
||||
myf myFlags);
|
||||
extern size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count);
|
||||
|
||||
#if defined(USE_HALLOC)
|
||||
#define my_malloc(a,b) halloc(a,1)
|
||||
#define my_no_flags_free(a) hfree(a)
|
||||
#endif
|
||||
|
||||
#endif /* __MY_NOSYS__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
129
deps/mysqllite/include/internal/my_rdtsc.h
vendored
129
deps/mysqllite/include/internal/my_rdtsc.h
vendored
@@ -1,129 +0,0 @@
|
||||
/* Copyright (C) 2008, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
rdtsc3 -- multi-platform timer code
|
||||
pgulutzan@mysql.com, 2005-08-29
|
||||
modified 2008-11-02
|
||||
*/
|
||||
|
||||
#ifndef MY_RDTSC_H
|
||||
#define MY_RDTSC_H
|
||||
|
||||
/**
|
||||
Characteristics of a timer.
|
||||
*/
|
||||
struct my_timer_unit_info
|
||||
{
|
||||
/** Routine used for the timer. */
|
||||
ulonglong routine;
|
||||
/** Overhead of the timer. */
|
||||
ulonglong overhead;
|
||||
/** Frequency of the timer. */
|
||||
ulonglong frequency;
|
||||
/** Resolution of the timer. */
|
||||
ulonglong resolution;
|
||||
};
|
||||
|
||||
/**
|
||||
Characteristics of all the supported timers.
|
||||
@sa my_timer_init().
|
||||
*/
|
||||
struct my_timer_info
|
||||
{
|
||||
/** Characteristics of the cycle timer. */
|
||||
struct my_timer_unit_info cycles;
|
||||
/** Characteristics of the nanosecond timer. */
|
||||
struct my_timer_unit_info nanoseconds;
|
||||
/** Characteristics of the microsecond timer. */
|
||||
struct my_timer_unit_info microseconds;
|
||||
/** Characteristics of the millisecond timer. */
|
||||
struct my_timer_unit_info milliseconds;
|
||||
/** Characteristics of the tick timer. */
|
||||
struct my_timer_unit_info ticks;
|
||||
};
|
||||
|
||||
typedef struct my_timer_info MY_TIMER_INFO;
|
||||
|
||||
C_MODE_START
|
||||
|
||||
/**
|
||||
A cycle timer.
|
||||
@return the current timer value, in cycles.
|
||||
*/
|
||||
ulonglong my_timer_cycles(void);
|
||||
|
||||
/**
|
||||
A namoseconds timer.
|
||||
@return the current timer value, in nanoseconds.
|
||||
*/
|
||||
ulonglong my_timer_nanoseconds(void);
|
||||
|
||||
/**
|
||||
A microseconds timer.
|
||||
@return the current timer value, in microseconds.
|
||||
*/
|
||||
ulonglong my_timer_microseconds(void);
|
||||
|
||||
/**
|
||||
A millisecond timer.
|
||||
@return the current timer value, in milliseconds.
|
||||
*/
|
||||
ulonglong my_timer_milliseconds(void);
|
||||
|
||||
/**
|
||||
A ticks timer.
|
||||
@return the current timer value, in ticks.
|
||||
*/
|
||||
ulonglong my_timer_ticks(void);
|
||||
|
||||
/**
|
||||
Timer initialization function.
|
||||
@param [out] mti the timer characteristics.
|
||||
*/
|
||||
void my_timer_init(MY_TIMER_INFO *mti);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#define MY_TIMER_ROUTINE_ASM_X86 1
|
||||
#define MY_TIMER_ROUTINE_ASM_X86_64 2
|
||||
#define MY_TIMER_ROUTINE_RDTSCLL 3
|
||||
#define MY_TIMER_ROUTINE_ASM_X86_WIN 4
|
||||
#define MY_TIMER_ROUTINE_RDTSC 5
|
||||
#define MY_TIMER_ROUTINE_ASM_IA64 6
|
||||
#define MY_TIMER_ROUTINE_ASM_PPC 7
|
||||
#define MY_TIMER_ROUTINE_SGI_CYCLE 8
|
||||
#define MY_TIMER_ROUTINE_GETHRTIME 9
|
||||
#define MY_TIMER_ROUTINE_READ_REAL_TIME 10
|
||||
#define MY_TIMER_ROUTINE_CLOCK_GETTIME 11
|
||||
#define MY_TIMER_ROUTINE_NXGETTIME 12
|
||||
#define MY_TIMER_ROUTINE_GETTIMEOFDAY 13
|
||||
#define MY_TIMER_ROUTINE_QUERYPERFORMANCECOUNTER 14
|
||||
#define MY_TIMER_ROUTINE_GETTICKCOUNT 15
|
||||
#define MY_TIMER_ROUTINE_TIME 16
|
||||
#define MY_TIMER_ROUTINE_TIMES 17
|
||||
#define MY_TIMER_ROUTINE_FTIME 18
|
||||
#define MY_TIMER_ROUTINE_ASM_PPC64 19
|
||||
#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC64 20
|
||||
#define MY_TIMER_ROUTINE_ASM_SUNPRO_SPARC32 21
|
||||
#define MY_TIMER_ROUTINE_ASM_SUNPRO_I386 22
|
||||
#define MY_TIMER_ROUTINE_ASM_GCC_SPARC64 23
|
||||
#define MY_TIMER_ROUTINE_ASM_GCC_SPARC32 24
|
||||
#define MY_TIMER_ROUTINE_MACH_ABSOLUTE_TIME 25
|
||||
#define MY_TIMER_ROUTINE_GETSYSTEMTIMEASFILETIME 26
|
||||
#define MY_TIMER_ROUTINE_ASM_SUNPRO_X86_64 27
|
||||
|
||||
#endif
|
||||
|
||||
64
deps/mysqllite/include/internal/my_stacktrace.h
vendored
64
deps/mysqllite/include/internal/my_stacktrace.h
vendored
@@ -1,64 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _my_stacktrace_h_
|
||||
#define _my_stacktrace_h_
|
||||
|
||||
#include <my_global.h>
|
||||
|
||||
#ifdef TARGET_OS_LINUX
|
||||
#if defined (__x86_64__) || defined (__i386__) || \
|
||||
(defined(__alpha__) && defined(__GNUC__))
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
#elif defined(__WIN__) || defined(HAVE_PRINTSTACK)
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
|
||||
#if HAVE_BACKTRACE && (HAVE_BACKTRACE_SYMBOLS || HAVE_BACKTRACE_SYMBOLS_FD)
|
||||
#undef HAVE_STACKTRACE
|
||||
#define HAVE_STACKTRACE 1
|
||||
#endif
|
||||
|
||||
#define HAVE_WRITE_CORE
|
||||
|
||||
#if HAVE_BACKTRACE && HAVE_BACKTRACE_SYMBOLS && \
|
||||
HAVE_CXXABI_H && HAVE_ABI_CXA_DEMANGLE && \
|
||||
HAVE_WEAK_SYMBOL
|
||||
#define BACKTRACE_DEMANGLE 1
|
||||
#endif
|
||||
|
||||
C_MODE_START
|
||||
|
||||
#if defined(HAVE_STACKTRACE) || defined(HAVE_BACKTRACE)
|
||||
void my_init_stacktrace();
|
||||
void my_print_stacktrace(uchar* stack_bottom, ulong thread_stack);
|
||||
void my_safe_print_str(const char* val, int max_len);
|
||||
void my_write_core(int sig);
|
||||
#if BACKTRACE_DEMANGLE
|
||||
char *my_demangle(const char *mangled_name, int *status);
|
||||
#endif
|
||||
#ifdef __WIN__
|
||||
void my_set_exception_pointers(EXCEPTION_POINTERS *ep);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_WRITE_CORE
|
||||
void my_write_core(int sig);
|
||||
#endif
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* _my_stacktrace_h_ */
|
||||
170
deps/mysqllite/include/internal/my_time.h
vendored
170
deps/mysqllite/include/internal/my_time.h
vendored
@@ -1,170 +0,0 @@
|
||||
/* Copyright (C) 2004-2005 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
This is a private header of sql-common library, containing
|
||||
declarations for my_time.c
|
||||
*/
|
||||
|
||||
#ifndef _my_time_h_
|
||||
#define _my_time_h_
|
||||
#include "my_global.h"
|
||||
#include "mysql_time.h"
|
||||
|
||||
C_MODE_START
|
||||
|
||||
extern ulonglong log_10_int[20];
|
||||
extern uchar days_in_month[];
|
||||
|
||||
/*
|
||||
Portable time_t replacement.
|
||||
Should be signed and hold seconds for 1902 -- 2038-01-19 range
|
||||
i.e at least a 32bit variable
|
||||
|
||||
Using the system built in time_t is not an option as
|
||||
we rely on the above requirements in the time functions
|
||||
*/
|
||||
typedef long my_time_t;
|
||||
|
||||
#define MY_TIME_T_MAX LONG_MAX
|
||||
#define MY_TIME_T_MIN LONG_MIN
|
||||
|
||||
/* Time handling defaults */
|
||||
#define TIMESTAMP_MAX_YEAR 2038
|
||||
#define TIMESTAMP_MIN_YEAR (1900 + YY_PART_YEAR - 1)
|
||||
#define TIMESTAMP_MAX_VALUE INT_MAX32
|
||||
#define TIMESTAMP_MIN_VALUE 1
|
||||
|
||||
/* two-digit years < this are 20..; >= this are 19.. */
|
||||
#define YY_PART_YEAR 70
|
||||
|
||||
/* Flags to str_to_datetime */
|
||||
#define TIME_FUZZY_DATE 1
|
||||
#define TIME_DATETIME_ONLY 2
|
||||
/* Must be same as MODE_NO_ZERO_IN_DATE */
|
||||
#define TIME_NO_ZERO_IN_DATE (65536L*2*2*2*2*2*2*2)
|
||||
/* Must be same as MODE_NO_ZERO_DATE */
|
||||
#define TIME_NO_ZERO_DATE (TIME_NO_ZERO_IN_DATE*2)
|
||||
#define TIME_INVALID_DATES (TIME_NO_ZERO_DATE*2)
|
||||
|
||||
#define MYSQL_TIME_WARN_TRUNCATED 1
|
||||
#define MYSQL_TIME_WARN_OUT_OF_RANGE 2
|
||||
|
||||
/* Limits for the TIME data type */
|
||||
#define TIME_MAX_HOUR 838
|
||||
#define TIME_MAX_MINUTE 59
|
||||
#define TIME_MAX_SECOND 59
|
||||
#define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \
|
||||
TIME_MAX_SECOND)
|
||||
#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \
|
||||
TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND)
|
||||
|
||||
my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date,
|
||||
ulonglong flags, int *was_cut);
|
||||
enum enum_mysql_timestamp_type
|
||||
str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
|
||||
ulonglong flags, int *was_cut);
|
||||
longlong number_to_datetime(longlong nr, MYSQL_TIME *time_res,
|
||||
ulonglong flags, int *was_cut);
|
||||
ulonglong TIME_to_ulonglong_datetime(const MYSQL_TIME *);
|
||||
ulonglong TIME_to_ulonglong_date(const MYSQL_TIME *);
|
||||
ulonglong TIME_to_ulonglong_time(const MYSQL_TIME *);
|
||||
ulonglong TIME_to_ulonglong(const MYSQL_TIME *);
|
||||
|
||||
|
||||
my_bool str_to_time(const char *str,uint length, MYSQL_TIME *l_time,
|
||||
int *warning);
|
||||
|
||||
int check_time_range(struct st_mysql_time *, int *warning);
|
||||
|
||||
long calc_daynr(uint year,uint month,uint day);
|
||||
uint calc_days_in_year(uint year);
|
||||
uint year_2000_handling(uint year);
|
||||
|
||||
void my_init_time(void);
|
||||
|
||||
|
||||
/*
|
||||
Function to check sanity of a TIMESTAMP value
|
||||
|
||||
DESCRIPTION
|
||||
Check if a given MYSQL_TIME value fits in TIMESTAMP range.
|
||||
This function doesn't make precise check, but rather a rough
|
||||
estimate.
|
||||
|
||||
RETURN VALUES
|
||||
FALSE The value seems sane
|
||||
TRUE The MYSQL_TIME value is definitely out of range
|
||||
*/
|
||||
|
||||
static inline my_bool validate_timestamp_range(const MYSQL_TIME *t)
|
||||
{
|
||||
if ((t->year > TIMESTAMP_MAX_YEAR || t->year < TIMESTAMP_MIN_YEAR) ||
|
||||
(t->year == TIMESTAMP_MAX_YEAR && (t->month > 1 || t->day > 19)) ||
|
||||
(t->year == TIMESTAMP_MIN_YEAR && (t->month < 12 || t->day < 31)))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
my_time_t
|
||||
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone,
|
||||
my_bool *in_dst_time_gap);
|
||||
|
||||
void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
|
||||
|
||||
/*
|
||||
Required buffer length for my_time_to_str, my_date_to_str,
|
||||
my_datetime_to_str and TIME_to_string functions. Note, that the
|
||||
caller is still responsible to check that given TIME structure
|
||||
has values in valid ranges, otherwise size of the buffer could
|
||||
be not enough. We also rely on the fact that even wrong values
|
||||
sent using binary protocol fit in this buffer.
|
||||
*/
|
||||
#define MAX_DATE_STRING_REP_LENGTH 30
|
||||
|
||||
int my_time_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
int my_date_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
int my_datetime_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
int my_TIME_to_str(const MYSQL_TIME *l_time, char *to);
|
||||
|
||||
/*
|
||||
Available interval types used in any statement.
|
||||
|
||||
'interval_type' must be sorted so that simple intervals comes first,
|
||||
ie year, quarter, month, week, day, hour, etc. The order based on
|
||||
interval size is also important and the intervals should be kept in a
|
||||
large to smaller order. (get_interval_value() depends on this)
|
||||
|
||||
Note: If you change the order of elements in this enum you should fix
|
||||
order of elements in 'interval_type_to_name' and 'interval_names'
|
||||
arrays
|
||||
|
||||
See also interval_type_to_name, get_interval_value, interval_names
|
||||
*/
|
||||
|
||||
enum interval_type
|
||||
{
|
||||
INTERVAL_YEAR, INTERVAL_QUARTER, INTERVAL_MONTH, INTERVAL_WEEK, INTERVAL_DAY,
|
||||
INTERVAL_HOUR, INTERVAL_MINUTE, INTERVAL_SECOND, INTERVAL_MICROSECOND,
|
||||
INTERVAL_YEAR_MONTH, INTERVAL_DAY_HOUR, INTERVAL_DAY_MINUTE,
|
||||
INTERVAL_DAY_SECOND, INTERVAL_HOUR_MINUTE, INTERVAL_HOUR_SECOND,
|
||||
INTERVAL_MINUTE_SECOND, INTERVAL_DAY_MICROSECOND, INTERVAL_HOUR_MICROSECOND,
|
||||
INTERVAL_MINUTE_MICROSECOND, INTERVAL_SECOND_MICROSECOND, INTERVAL_LAST
|
||||
};
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* _my_time_h_ */
|
||||
96
deps/mysqllite/include/internal/my_tree.h
vendored
96
deps/mysqllite/include/internal/my_tree.h
vendored
@@ -1,96 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _tree_h
|
||||
#define _tree_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "my_base.h" /* get 'enum ha_rkey_function' */
|
||||
#include "my_alloc.h" /* MEM_ROOT */
|
||||
|
||||
/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
|
||||
#define MAX_TREE_HEIGHT 64
|
||||
|
||||
#define ELEMENT_KEY(tree,element)\
|
||||
(tree->offset_to_key ? (void*)((uchar*) element+tree->offset_to_key) :\
|
||||
*((void**) (element+1)))
|
||||
|
||||
#define tree_set_pointer(element,ptr) *((uchar **) (element+1))=((uchar*) (ptr))
|
||||
|
||||
#define TREE_NO_DUPS 1
|
||||
|
||||
typedef enum { left_root_right, right_root_left } TREE_WALK;
|
||||
typedef uint32 element_count;
|
||||
typedef int (*tree_walk_action)(void *,element_count,void *);
|
||||
|
||||
typedef enum { free_init, free_free, free_end } TREE_FREE;
|
||||
typedef void (*tree_element_free)(void*, TREE_FREE, void *);
|
||||
|
||||
typedef struct st_tree_element {
|
||||
struct st_tree_element *left,*right;
|
||||
uint32 count:31,
|
||||
colour:1; /* black is marked as 1 */
|
||||
} TREE_ELEMENT;
|
||||
|
||||
#define ELEMENT_CHILD(element, offs) (*(TREE_ELEMENT**)((char*)element + offs))
|
||||
|
||||
typedef struct st_tree {
|
||||
TREE_ELEMENT *root,null_element;
|
||||
TREE_ELEMENT **parents[MAX_TREE_HEIGHT];
|
||||
uint offset_to_key,elements_in_tree,size_of_element;
|
||||
ulong memory_limit, allocated;
|
||||
qsort_cmp2 compare;
|
||||
void *custom_arg;
|
||||
MEM_ROOT mem_root;
|
||||
my_bool with_delete;
|
||||
tree_element_free free;
|
||||
uint flag;
|
||||
} TREE;
|
||||
|
||||
/* Functions on whole tree */
|
||||
void init_tree(TREE *tree, ulong default_alloc_size, ulong memory_limit,
|
||||
int size, qsort_cmp2 compare, my_bool with_delete,
|
||||
tree_element_free free_element, void *custom_arg);
|
||||
void delete_tree(TREE*);
|
||||
void reset_tree(TREE*);
|
||||
/* similar to delete tree, except we do not my_free() blocks in mem_root
|
||||
*/
|
||||
#define is_tree_inited(tree) ((tree)->root != 0)
|
||||
|
||||
/* Functions on leafs */
|
||||
TREE_ELEMENT *tree_insert(TREE *tree,void *key, uint key_size,
|
||||
void *custom_arg);
|
||||
void *tree_search(TREE *tree, void *key, void *custom_arg);
|
||||
int tree_walk(TREE *tree,tree_walk_action action,
|
||||
void *argument, TREE_WALK visit);
|
||||
int tree_delete(TREE *tree, void *key, uint key_size, void *custom_arg);
|
||||
void *tree_search_key(TREE *tree, const void *key,
|
||||
TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos,
|
||||
enum ha_rkey_function flag, void *custom_arg);
|
||||
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents,
|
||||
TREE_ELEMENT ***last_pos, int child_offs);
|
||||
void *tree_search_next(TREE *tree, TREE_ELEMENT ***last_pos, int l_offs,
|
||||
int r_offs);
|
||||
ha_rows tree_record_pos(TREE *tree, const void *key,
|
||||
enum ha_rkey_function search_flag, void *custom_arg);
|
||||
|
||||
#define TREE_ELEMENT_EXTRA_SIZE (sizeof(TREE_ELEMENT) + sizeof(void*))
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
1483
deps/mysqllite/include/internal/my_uctype.h
vendored
1483
deps/mysqllite/include/internal/my_uctype.h
vendored
File diff suppressed because it is too large
Load Diff
242
deps/mysqllite/include/internal/myisampack.h
vendored
242
deps/mysqllite/include/internal/myisampack.h
vendored
@@ -1,242 +0,0 @@
|
||||
#ifndef MYISAMPACK_INCLUDED
|
||||
#define MYISAMPACK_INCLUDED
|
||||
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Storing of values in high byte first order.
|
||||
|
||||
integer keys and file pointers are stored with high byte first to get
|
||||
better compression
|
||||
*/
|
||||
|
||||
/* these two are for uniformity */
|
||||
#define mi_sint1korr(A) ((int8)(*A))
|
||||
#define mi_uint1korr(A) ((uint8)(*A))
|
||||
|
||||
#define mi_sint2korr(A) ((int16) (((int16) (((uchar*) (A))[1])) +\
|
||||
((int16) ((int16) ((char*) (A))[0]) << 8)))
|
||||
#define mi_sint3korr(A) ((int32) (((((uchar*) (A))[0]) & 128) ? \
|
||||
(((uint32) 255L << 24) | \
|
||||
(((uint32) ((uchar*) (A))[0]) << 16) |\
|
||||
(((uint32) ((uchar*) (A))[1]) << 8) | \
|
||||
((uint32) ((uchar*) (A))[2])) : \
|
||||
(((uint32) ((uchar*) (A))[0]) << 16) |\
|
||||
(((uint32) ((uchar*) (A))[1]) << 8) | \
|
||||
((uint32) ((uchar*) (A))[2])))
|
||||
#define mi_sint4korr(A) ((int32) (((int32) (((uchar*) (A))[3])) +\
|
||||
((int32) (((uchar*) (A))[2]) << 8) +\
|
||||
((int32) (((uchar*) (A))[1]) << 16) +\
|
||||
((int32) ((int16) ((char*) (A))[0]) << 24)))
|
||||
#define mi_sint8korr(A) ((longlong) mi_uint8korr(A))
|
||||
#define mi_uint2korr(A) ((uint16) (((uint16) (((uchar*) (A))[1])) +\
|
||||
((uint16) (((uchar*) (A))[0]) << 8)))
|
||||
#define mi_uint3korr(A) ((uint32) (((uint32) (((uchar*) (A))[2])) +\
|
||||
(((uint32) (((uchar*) (A))[1])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[0])) << 16)))
|
||||
#define mi_uint4korr(A) ((uint32) (((uint32) (((uchar*) (A))[3])) +\
|
||||
(((uint32) (((uchar*) (A))[2])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[1])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[0])) << 24)))
|
||||
#define mi_uint5korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[4])) +\
|
||||
(((uint32) (((uchar*) (A))[3])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[2])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[1])) << 24)) +\
|
||||
(((ulonglong) (((uchar*) (A))[0])) << 32))
|
||||
#define mi_uint6korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[5])) +\
|
||||
(((uint32) (((uchar*) (A))[4])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[3])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[2])) << 24)) +\
|
||||
(((ulonglong) (((uint32) (((uchar*) (A))[1])) +\
|
||||
(((uint32) (((uchar*) (A))[0]) << 8)))) <<\
|
||||
32))
|
||||
#define mi_uint7korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[6])) +\
|
||||
(((uint32) (((uchar*) (A))[5])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[4])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[3])) << 24)) +\
|
||||
(((ulonglong) (((uint32) (((uchar*) (A))[2])) +\
|
||||
(((uint32) (((uchar*) (A))[1])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[0])) << 16))) <<\
|
||||
32))
|
||||
#define mi_uint8korr(A) ((ulonglong)(((uint32) (((uchar*) (A))[7])) +\
|
||||
(((uint32) (((uchar*) (A))[6])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[5])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[4])) << 24)) +\
|
||||
(((ulonglong) (((uint32) (((uchar*) (A))[3])) +\
|
||||
(((uint32) (((uchar*) (A))[2])) << 8) +\
|
||||
(((uint32) (((uchar*) (A))[1])) << 16) +\
|
||||
(((uint32) (((uchar*) (A))[0])) << 24))) <<\
|
||||
32))
|
||||
|
||||
/* This one is for uniformity */
|
||||
#define mi_int1store(T,A) *((uchar*)(T))= (uchar) (A)
|
||||
|
||||
#define mi_int2store(T,A) { uint def_temp= (uint) (A) ;\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp >> 8); }
|
||||
#define mi_int3store(T,A) { /*lint -save -e734 */\
|
||||
ulong def_temp= (ulong) (A);\
|
||||
((uchar*) (T))[2]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp >> 8);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp >> 16);\
|
||||
/*lint -restore */}
|
||||
#define mi_int4store(T,A) { ulong def_temp= (ulong) (A);\
|
||||
((uchar*) (T))[3]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[2]= (uchar) (def_temp >> 8);\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp >> 16);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp >> 24); }
|
||||
#define mi_int5store(T,A) { ulong def_temp= (ulong) (A),\
|
||||
def_temp2= (ulong) ((A) >> 32);\
|
||||
((uchar*) (T))[4]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[3]= (uchar) (def_temp >> 8);\
|
||||
((uchar*) (T))[2]= (uchar) (def_temp >> 16);\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp >> 24);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp2); }
|
||||
#define mi_int6store(T,A) { ulong def_temp= (ulong) (A),\
|
||||
def_temp2= (ulong) ((A) >> 32);\
|
||||
((uchar*) (T))[5]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[4]= (uchar) (def_temp >> 8);\
|
||||
((uchar*) (T))[3]= (uchar) (def_temp >> 16);\
|
||||
((uchar*) (T))[2]= (uchar) (def_temp >> 24);\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp2);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp2 >> 8); }
|
||||
#define mi_int7store(T,A) { ulong def_temp= (ulong) (A),\
|
||||
def_temp2= (ulong) ((A) >> 32);\
|
||||
((uchar*) (T))[6]= (uchar) (def_temp);\
|
||||
((uchar*) (T))[5]= (uchar) (def_temp >> 8);\
|
||||
((uchar*) (T))[4]= (uchar) (def_temp >> 16);\
|
||||
((uchar*) (T))[3]= (uchar) (def_temp >> 24);\
|
||||
((uchar*) (T))[2]= (uchar) (def_temp2);\
|
||||
((uchar*) (T))[1]= (uchar) (def_temp2 >> 8);\
|
||||
((uchar*) (T))[0]= (uchar) (def_temp2 >> 16); }
|
||||
#define mi_int8store(T,A) { ulong def_temp3= (ulong) (A),\
|
||||
def_temp4= (ulong) ((A) >> 32);\
|
||||
mi_int4store((uchar*) (T) + 0, def_temp4);\
|
||||
mi_int4store((uchar*) (T) + 4, def_temp3); }
|
||||
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
||||
#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[0];\
|
||||
((uchar*) (T))[1]= ((uchar*) &A)[1];\
|
||||
((uchar*) (T))[2]= ((uchar*) &A)[2];\
|
||||
((uchar*) (T))[3]= ((uchar*) &A)[3]; }
|
||||
|
||||
#define mi_float4get(V,M) { float def_temp;\
|
||||
((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\
|
||||
((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\
|
||||
((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\
|
||||
((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\
|
||||
(V)= def_temp; }
|
||||
|
||||
#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[0];\
|
||||
((uchar*) (T))[1]= ((uchar*) &V)[1];\
|
||||
((uchar*) (T))[2]= ((uchar*) &V)[2];\
|
||||
((uchar*) (T))[3]= ((uchar*) &V)[3];\
|
||||
((uchar*) (T))[4]= ((uchar*) &V)[4];\
|
||||
((uchar*) (T))[5]= ((uchar*) &V)[5];\
|
||||
((uchar*) (T))[6]= ((uchar*) &V)[6];\
|
||||
((uchar*) (T))[7]= ((uchar*) &V)[7]; }
|
||||
|
||||
#define mi_float8get(V,M) { double def_temp;\
|
||||
((uchar*) &def_temp)[0]= ((uchar*) (M))[0];\
|
||||
((uchar*) &def_temp)[1]= ((uchar*) (M))[1];\
|
||||
((uchar*) &def_temp)[2]= ((uchar*) (M))[2];\
|
||||
((uchar*) &def_temp)[3]= ((uchar*) (M))[3];\
|
||||
((uchar*) &def_temp)[4]= ((uchar*) (M))[4];\
|
||||
((uchar*) &def_temp)[5]= ((uchar*) (M))[5];\
|
||||
((uchar*) &def_temp)[6]= ((uchar*) (M))[6];\
|
||||
((uchar*) &def_temp)[7]= ((uchar*) (M))[7]; \
|
||||
(V)= def_temp; }
|
||||
#else
|
||||
|
||||
#define mi_float4store(T,A) { ((uchar*) (T))[0]= ((uchar*) &A)[3];\
|
||||
((uchar*) (T))[1]= ((uchar*) &A)[2];\
|
||||
((uchar*) (T))[2]= ((uchar*) &A)[1];\
|
||||
((uchar*) (T))[3]= ((uchar*) &A)[0]; }
|
||||
|
||||
#define mi_float4get(V,M) { float def_temp;\
|
||||
((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\
|
||||
((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\
|
||||
((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\
|
||||
((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\
|
||||
(V)= def_temp; }
|
||||
|
||||
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
|
||||
#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[3];\
|
||||
((uchar*) (T))[1]= ((uchar*) &V)[2];\
|
||||
((uchar*) (T))[2]= ((uchar*) &V)[1];\
|
||||
((uchar*) (T))[3]= ((uchar*) &V)[0];\
|
||||
((uchar*) (T))[4]= ((uchar*) &V)[7];\
|
||||
((uchar*) (T))[5]= ((uchar*) &V)[6];\
|
||||
((uchar*) (T))[6]= ((uchar*) &V)[5];\
|
||||
((uchar*) (T))[7]= ((uchar*) &V)[4];}
|
||||
|
||||
#define mi_float8get(V,M) { double def_temp;\
|
||||
((uchar*) &def_temp)[0]= ((uchar*) (M))[3];\
|
||||
((uchar*) &def_temp)[1]= ((uchar*) (M))[2];\
|
||||
((uchar*) &def_temp)[2]= ((uchar*) (M))[1];\
|
||||
((uchar*) &def_temp)[3]= ((uchar*) (M))[0];\
|
||||
((uchar*) &def_temp)[4]= ((uchar*) (M))[7];\
|
||||
((uchar*) &def_temp)[5]= ((uchar*) (M))[6];\
|
||||
((uchar*) &def_temp)[6]= ((uchar*) (M))[5];\
|
||||
((uchar*) &def_temp)[7]= ((uchar*) (M))[4];\
|
||||
(V)= def_temp; }
|
||||
|
||||
#else
|
||||
#define mi_float8store(T,V) { ((uchar*) (T))[0]= ((uchar*) &V)[7];\
|
||||
((uchar*) (T))[1]= ((uchar*) &V)[6];\
|
||||
((uchar*) (T))[2]= ((uchar*) &V)[5];\
|
||||
((uchar*) (T))[3]= ((uchar*) &V)[4];\
|
||||
((uchar*) (T))[4]= ((uchar*) &V)[3];\
|
||||
((uchar*) (T))[5]= ((uchar*) &V)[2];\
|
||||
((uchar*) (T))[6]= ((uchar*) &V)[1];\
|
||||
((uchar*) (T))[7]= ((uchar*) &V)[0];}
|
||||
|
||||
#define mi_float8get(V,M) { double def_temp;\
|
||||
((uchar*) &def_temp)[0]= ((uchar*) (M))[7];\
|
||||
((uchar*) &def_temp)[1]= ((uchar*) (M))[6];\
|
||||
((uchar*) &def_temp)[2]= ((uchar*) (M))[5];\
|
||||
((uchar*) &def_temp)[3]= ((uchar*) (M))[4];\
|
||||
((uchar*) &def_temp)[4]= ((uchar*) (M))[3];\
|
||||
((uchar*) &def_temp)[5]= ((uchar*) (M))[2];\
|
||||
((uchar*) &def_temp)[6]= ((uchar*) (M))[1];\
|
||||
((uchar*) &def_temp)[7]= ((uchar*) (M))[0];\
|
||||
(V)= def_temp; }
|
||||
#endif /* __FLOAT_WORD_ORDER */
|
||||
#endif /* WORDS_BIGENDIAN */
|
||||
|
||||
/* Fix to avoid warnings when sizeof(ha_rows) == sizeof(long) */
|
||||
|
||||
#ifdef BIG_TABLES
|
||||
#define mi_rowstore(T,A) mi_int8store(T, A)
|
||||
#define mi_rowkorr(T) mi_uint8korr(T)
|
||||
#else
|
||||
#define mi_rowstore(T,A) { mi_int4store(T, 0);\
|
||||
mi_int4store(((uchar*) (T) + 4), A); }
|
||||
#define mi_rowkorr(T) mi_uint4korr((uchar*) (T) + 4)
|
||||
#endif
|
||||
|
||||
#if SIZEOF_OFF_T > 4
|
||||
#define mi_sizestore(T,A) mi_int8store(T, A)
|
||||
#define mi_sizekorr(T) mi_uint8korr(T)
|
||||
#else
|
||||
#define mi_sizestore(T,A) { if ((A) == HA_OFFSET_ERROR)\
|
||||
bfill((char*) (T), 8, 255);\
|
||||
else { mi_int4store((T), 0);\
|
||||
mi_int4store(((T) + 4), A); }}
|
||||
#define mi_sizekorr(T) mi_uint4korr((uchar*) (T) + 4)
|
||||
#endif
|
||||
#endif /* MYISAMPACK_INCLUDED */
|
||||
@@ -1,30 +0,0 @@
|
||||
/* Copyright Abandoned 1996, 1999, 2001 MySQL AB
|
||||
This file is public domain and comes with NO WARRANTY of any kind */
|
||||
|
||||
/* Version numbers for protocol & mysqld */
|
||||
|
||||
#ifndef _mysql_version_h
|
||||
#define _mysql_version_h
|
||||
#ifdef _CUSTOMCONFIG_
|
||||
#include <custom_conf.h>
|
||||
#else
|
||||
#define PROTOCOL_VERSION @PROTOCOL_VERSION@
|
||||
#define MYSQL_SERVER_VERSION "@VERSION@"
|
||||
#define MYSQL_BASE_VERSION "mysqld-@MYSQL_BASE_VERSION@"
|
||||
#define MYSQL_SERVER_SUFFIX_DEF "@MYSQL_SERVER_SUFFIX@"
|
||||
#define FRM_VER @DOT_FRM_VERSION@
|
||||
#define MYSQL_VERSION_ID @MYSQL_VERSION_ID@
|
||||
#define MYSQL_PORT @MYSQL_TCP_PORT@
|
||||
#define MYSQL_PORT_DEFAULT @MYSQL_TCP_PORT_DEFAULT@
|
||||
#define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@"
|
||||
#define MYSQL_CONFIG_NAME "my"
|
||||
#define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@"
|
||||
|
||||
/* mysqld compile time options */
|
||||
#endif /* _CUSTOMCONFIG_ */
|
||||
|
||||
#ifndef LICENSE
|
||||
#define LICENSE GPL
|
||||
#endif /* LICENSE */
|
||||
|
||||
#endif /* _mysql_version_h */
|
||||
93
deps/mysqllite/include/internal/mysys_err.h
vendored
93
deps/mysqllite/include/internal/mysys_err.h
vendored
@@ -1,93 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#ifndef _mysys_err_h
|
||||
#define _mysys_err_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define GLOBERRS (EE_ERROR_LAST - EE_ERROR_FIRST + 1) /* Nr of global errors */
|
||||
#define EE(X) (globerrs[(X) - EE_ERROR_FIRST])
|
||||
|
||||
extern const char *globerrs[]; /* my_error_messages is here */
|
||||
|
||||
/* Error message numbers in global map */
|
||||
/*
|
||||
Do not add error numbers before EE_ERROR_FIRST.
|
||||
If necessary to add lower numbers, change EE_ERROR_FIRST accordingly.
|
||||
|
||||
We start with error 1 to not confuse peoples with 'error 0'
|
||||
*/
|
||||
|
||||
#define EE_ERROR_FIRST 1 /*Copy first error nr.*/
|
||||
#define EE_CANTCREATEFILE 1
|
||||
#define EE_READ 2
|
||||
#define EE_WRITE 3
|
||||
#define EE_BADCLOSE 4
|
||||
#define EE_OUTOFMEMORY 5
|
||||
#define EE_DELETE 6
|
||||
#define EE_LINK 7
|
||||
#define EE_EOFERR 9
|
||||
#define EE_CANTLOCK 10
|
||||
#define EE_CANTUNLOCK 11
|
||||
#define EE_DIR 12
|
||||
#define EE_STAT 13
|
||||
#define EE_CANT_CHSIZE 14
|
||||
#define EE_CANT_OPEN_STREAM 15
|
||||
#define EE_GETWD 16
|
||||
#define EE_SETWD 17
|
||||
#define EE_LINK_WARNING 18
|
||||
#define EE_OPEN_WARNING 19
|
||||
#define EE_DISK_FULL 20
|
||||
#define EE_CANT_MKDIR 21
|
||||
#define EE_UNKNOWN_CHARSET 22
|
||||
#define EE_OUT_OF_FILERESOURCES 23
|
||||
#define EE_CANT_READLINK 24
|
||||
#define EE_CANT_SYMLINK 25
|
||||
#define EE_REALPATH 26
|
||||
#define EE_SYNC 27
|
||||
#define EE_UNKNOWN_COLLATION 28
|
||||
#define EE_FILENOTFOUND 29
|
||||
#define EE_FILE_NOT_CLOSED 30
|
||||
#define EE_CHANGE_OWNERSHIP 31
|
||||
#define EE_CHANGE_PERMISSIONS 32
|
||||
#define EE_CANT_SEEK 33
|
||||
#define EE_ERROR_LAST 33 /* Copy last error nr */
|
||||
/* Add error numbers before EE_ERROR_LAST and change it accordingly. */
|
||||
|
||||
/* exit codes for all MySQL programs */
|
||||
|
||||
#define EXIT_UNSPECIFIED_ERROR 1
|
||||
#define EXIT_UNKNOWN_OPTION 2
|
||||
#define EXIT_AMBIGUOUS_OPTION 3
|
||||
#define EXIT_NO_ARGUMENT_ALLOWED 4
|
||||
#define EXIT_ARGUMENT_REQUIRED 5
|
||||
#define EXIT_VAR_PREFIX_NOT_UNIQUE 6
|
||||
#define EXIT_UNKNOWN_VARIABLE 7
|
||||
#define EXIT_OUT_OF_MEMORY 8
|
||||
#define EXIT_UNKNOWN_SUFFIX 9
|
||||
#define EXIT_NO_PTR_TO_VARIABLE 10
|
||||
#define EXIT_CANNOT_CONNECT_TO_SERVICE 11
|
||||
#define EXIT_OPTION_DISABLED 12
|
||||
#define EXIT_ARGUMENT_INVALID 13
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
32
deps/mysqllite/include/internal/password.h
vendored
32
deps/mysqllite/include/internal/password.h
vendored
@@ -1,32 +0,0 @@
|
||||
/* Copyright 2006-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
#ifndef PASSWORD_INCLUDED
|
||||
#define PASSWORD_INCLUDED
|
||||
|
||||
#include "my_global.h"
|
||||
|
||||
C_MODE_START
|
||||
|
||||
void my_make_scrambled_password_323(char *to, const char *password,
|
||||
size_t pass_len);
|
||||
void my_make_scrambled_password(char *to, const char *password,
|
||||
size_t pass_len);
|
||||
|
||||
void hash_password(ulong *result, const char *password, uint password_len);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* PASSWORD_INCLUDED */
|
||||
13
deps/mysqllite/include/internal/probes_mysql.h
vendored
13
deps/mysqllite/include/internal/probes_mysql.h
vendored
@@ -1,13 +0,0 @@
|
||||
#ifndef PROBES_MYSQL_H
|
||||
|
||||
#define PROBES_MYSQL_H
|
||||
|
||||
#include <my_global.h>
|
||||
|
||||
#if defined(HAVE_DTRACE) && !defined(DISABLE_DTRACE)
|
||||
#include "probes_mysql_dtrace.h"
|
||||
#else
|
||||
#include "probes_mysql_nodtrace.h"
|
||||
#endif
|
||||
|
||||
#endif /* PROBES_MYSQL_H */
|
||||
@@ -1,129 +0,0 @@
|
||||
/*
|
||||
* Generated by dheadgen(1).
|
||||
*/
|
||||
|
||||
#ifndef _PROBES_MYSQL_D
|
||||
#define _PROBES_MYSQL_D
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MYSQL_CONNECTION_START(arg0, arg1, arg2)
|
||||
#define MYSQL_CONNECTION_START_ENABLED() (0)
|
||||
#define MYSQL_CONNECTION_DONE(arg0, arg1)
|
||||
#define MYSQL_CONNECTION_DONE_ENABLED() (0)
|
||||
#define MYSQL_COMMAND_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_COMMAND_START_ENABLED() (0)
|
||||
#define MYSQL_COMMAND_DONE(arg0)
|
||||
#define MYSQL_COMMAND_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_START(arg0, arg1, arg2, arg3, arg4)
|
||||
#define MYSQL_QUERY_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_DONE(arg0)
|
||||
#define MYSQL_QUERY_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_PARSE_START(arg0)
|
||||
#define MYSQL_QUERY_PARSE_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_PARSE_DONE(arg0)
|
||||
#define MYSQL_QUERY_PARSE_DONE_ENABLED() (0)
|
||||
#define MYSQL_QUERY_CACHE_HIT(arg0, arg1)
|
||||
#define MYSQL_QUERY_CACHE_HIT_ENABLED() (0)
|
||||
#define MYSQL_QUERY_CACHE_MISS(arg0)
|
||||
#define MYSQL_QUERY_CACHE_MISS_ENABLED() (0)
|
||||
#define MYSQL_QUERY_EXEC_START(arg0, arg1, arg2, arg3, arg4, arg5)
|
||||
#define MYSQL_QUERY_EXEC_START_ENABLED() (0)
|
||||
#define MYSQL_QUERY_EXEC_DONE(arg0)
|
||||
#define MYSQL_QUERY_EXEC_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_ROW_START(arg0, arg1)
|
||||
#define MYSQL_INSERT_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_ROW_DONE(arg0)
|
||||
#define MYSQL_INSERT_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_ROW_START(arg0, arg1)
|
||||
#define MYSQL_UPDATE_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_ROW_DONE(arg0)
|
||||
#define MYSQL_UPDATE_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_DELETE_ROW_START(arg0, arg1)
|
||||
#define MYSQL_DELETE_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_DELETE_ROW_DONE(arg0)
|
||||
#define MYSQL_DELETE_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_READ_ROW_START(arg0, arg1, arg2)
|
||||
#define MYSQL_READ_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_READ_ROW_DONE(arg0)
|
||||
#define MYSQL_READ_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_INDEX_READ_ROW_START(arg0, arg1)
|
||||
#define MYSQL_INDEX_READ_ROW_START_ENABLED() (0)
|
||||
#define MYSQL_INDEX_READ_ROW_DONE(arg0)
|
||||
#define MYSQL_INDEX_READ_ROW_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_RDLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_RDLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_WRLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_WRLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_UNLOCK_START(arg0, arg1)
|
||||
#define MYSQL_HANDLER_UNLOCK_START_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_RDLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_RDLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_WRLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_WRLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_HANDLER_UNLOCK_DONE(arg0)
|
||||
#define MYSQL_HANDLER_UNLOCK_DONE_ENABLED() (0)
|
||||
#define MYSQL_FILESORT_START(arg0, arg1)
|
||||
#define MYSQL_FILESORT_START_ENABLED() (0)
|
||||
#define MYSQL_FILESORT_DONE(arg0, arg1)
|
||||
#define MYSQL_FILESORT_DONE_ENABLED() (0)
|
||||
#define MYSQL_SELECT_START(arg0)
|
||||
#define MYSQL_SELECT_START_ENABLED() (0)
|
||||
#define MYSQL_SELECT_DONE(arg0, arg1)
|
||||
#define MYSQL_SELECT_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_START(arg0)
|
||||
#define MYSQL_INSERT_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_DONE(arg0, arg1)
|
||||
#define MYSQL_INSERT_DONE_ENABLED() (0)
|
||||
#define MYSQL_INSERT_SELECT_START(arg0)
|
||||
#define MYSQL_INSERT_SELECT_START_ENABLED() (0)
|
||||
#define MYSQL_INSERT_SELECT_DONE(arg0, arg1)
|
||||
#define MYSQL_INSERT_SELECT_DONE_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_START(arg0)
|
||||
#define MYSQL_UPDATE_START_ENABLED() (0)
|
||||
#define MYSQL_UPDATE_DONE(arg0, arg1, arg2)
|
||||
#define MYSQL_UPDATE_DONE_ENABLED() (0)
|
||||
#define MYSQL_MULTI_UPDATE_START(arg0)
|
||||
#define MYSQL_MULTI_UPDATE_START_ENABLED() (0)
|
||||
#define MYSQL_MULTI_UPDATE_DONE(arg0, arg1, arg2)
|
||||
#define MYSQL_MULTI_UPDATE_DONE_ENABLED() (0)
|
||||
#define MYSQL_DELETE_START(arg0)
|
||||
#define MYSQL_DELETE_START_ENABLED() (0)
|
||||
#define MYSQL_DELETE_DONE(arg0, arg1)
|
||||
#define MYSQL_DELETE_DONE_ENABLED() (0)
|
||||
#define MYSQL_MULTI_DELETE_START(arg0)
|
||||
#define MYSQL_MULTI_DELETE_START_ENABLED() (0)
|
||||
#define MYSQL_MULTI_DELETE_DONE(arg0, arg1)
|
||||
#define MYSQL_MULTI_DELETE_DONE_ENABLED() (0)
|
||||
#define MYSQL_NET_READ_START()
|
||||
#define MYSQL_NET_READ_START_ENABLED() (0)
|
||||
#define MYSQL_NET_READ_DONE(arg0, arg1)
|
||||
#define MYSQL_NET_READ_DONE_ENABLED() (0)
|
||||
#define MYSQL_NET_WRITE_START(arg0)
|
||||
#define MYSQL_NET_WRITE_START_ENABLED() (0)
|
||||
#define MYSQL_NET_WRITE_DONE(arg0)
|
||||
#define MYSQL_NET_WRITE_DONE_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_KEYCACHE_READ_START_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_BLOCK(arg0)
|
||||
#define MYSQL_KEYCACHE_READ_BLOCK_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_HIT()
|
||||
#define MYSQL_KEYCACHE_READ_HIT_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_MISS()
|
||||
#define MYSQL_KEYCACHE_READ_MISS_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_READ_DONE(arg0, arg1)
|
||||
#define MYSQL_KEYCACHE_READ_DONE_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_START(arg0, arg1, arg2, arg3)
|
||||
#define MYSQL_KEYCACHE_WRITE_START_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_BLOCK(arg0)
|
||||
#define MYSQL_KEYCACHE_WRITE_BLOCK_ENABLED() (0)
|
||||
#define MYSQL_KEYCACHE_WRITE_DONE(arg0, arg1)
|
||||
#define MYSQL_KEYCACHE_WRITE_DONE_ENABLED() (0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _PROBES_MYSQL_D */
|
||||
75
deps/mysqllite/include/internal/queues.h
vendored
75
deps/mysqllite/include/internal/queues.h
vendored
@@ -1,75 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Code for generell handling of priority Queues.
|
||||
Implemention of queues from "Algoritms in C" by Robert Sedgewick.
|
||||
Copyright Monty Program KB.
|
||||
By monty.
|
||||
*/
|
||||
|
||||
#ifndef _queues_h
|
||||
#define _queues_h
|
||||
|
||||
#include "my_global.h" /* uchar */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct st_queue {
|
||||
uchar **root;
|
||||
void *first_cmp_arg;
|
||||
uint elements;
|
||||
uint max_elements;
|
||||
uint offset_to_key; /* compare is done on element+offset */
|
||||
int max_at_top; /* Normally 1, set to -1 if queue_top gives max */
|
||||
int (*compare)(void *, uchar *,uchar *);
|
||||
uint auto_extent;
|
||||
} QUEUE;
|
||||
|
||||
#define queue_top(queue) ((queue)->root[1])
|
||||
#define queue_element(queue,index) ((queue)->root[index+1])
|
||||
#define queue_end(queue) ((queue)->root[(queue)->elements])
|
||||
#define queue_replaced(queue) _downheap(queue,1)
|
||||
#define queue_set_cmp_arg(queue, set_arg) (queue)->first_cmp_arg= set_arg
|
||||
#define queue_set_max_at_top(queue, set_arg) \
|
||||
(queue)->max_at_top= set_arg ? -1 : 1
|
||||
typedef int (*queue_compare)(void *,uchar *, uchar *);
|
||||
|
||||
int init_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
|
||||
pbool max_at_top, queue_compare compare,
|
||||
void *first_cmp_arg);
|
||||
int init_queue_ex(QUEUE *queue,uint max_elements,uint offset_to_key,
|
||||
pbool max_at_top, queue_compare compare,
|
||||
void *first_cmp_arg, uint auto_extent);
|
||||
int reinit_queue(QUEUE *queue,uint max_elements,uint offset_to_key,
|
||||
pbool max_at_top, queue_compare compare,
|
||||
void *first_cmp_arg);
|
||||
int resize_queue(QUEUE *queue, uint max_elements);
|
||||
void delete_queue(QUEUE *queue);
|
||||
void queue_insert(QUEUE *queue,uchar *element);
|
||||
int queue_insert_safe(QUEUE *queue, uchar *element);
|
||||
uchar *queue_remove(QUEUE *queue,uint idx);
|
||||
#define queue_remove_all(queue) { (queue)->elements= 0; }
|
||||
#define queue_is_full(queue) (queue->elements == queue->max_elements)
|
||||
void _downheap(QUEUE *queue,uint idx);
|
||||
void queue_fix(QUEUE *queue);
|
||||
#define is_queue_inited(queue) ((queue)->root != 0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
46
deps/mysqllite/include/internal/rijndael.h
vendored
46
deps/mysqllite/include/internal/rijndael.h
vendored
@@ -1,46 +0,0 @@
|
||||
#ifndef RIJNDAEL_INCLUDED
|
||||
#define RIJNDAEL_INCLUDED
|
||||
|
||||
/* Copyright (C) 2002 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
|
||||
/*
|
||||
rijndael-alg-fst.h
|
||||
|
||||
@version 3.0 (December 2000)
|
||||
Optimised ANSI C code for the Rijndael cipher (now AES)
|
||||
@author Vincent Rijmen <vincent.rijmen@esat.kuleuven.ac.be>
|
||||
@author Antoon Bosselaers <antoon.bosselaers@esat.kuleuven.ac.be>
|
||||
@author Paulo Barreto <paulo.barreto@terra.com.br>
|
||||
|
||||
This code is hereby placed in the public domain.
|
||||
Modified by Peter Zaitsev to fit MySQL coding style.
|
||||
*/
|
||||
|
||||
#define AES_MAXKC (256/32)
|
||||
#define AES_MAXKB (256/8)
|
||||
#define AES_MAXNR 14
|
||||
|
||||
int rijndaelKeySetupEnc(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
|
||||
int keyBits);
|
||||
int rijndaelKeySetupDec(uint32 rk[/*4*(Nr + 1)*/], const uint8 cipherKey[],
|
||||
int keyBits);
|
||||
void rijndaelEncrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
|
||||
const uint8 pt[16], uint8 ct[16]);
|
||||
void rijndaelDecrypt(const uint32 rk[/*4*(Nr + 1)*/], int Nr,
|
||||
const uint8 ct[16], uint8 pt[16]);
|
||||
|
||||
#endif /* RIJNDAEL_INCLUDED */
|
||||
104
deps/mysqllite/include/internal/sha1.h
vendored
104
deps/mysqllite/include/internal/sha1.h
vendored
@@ -1,104 +0,0 @@
|
||||
#ifndef SHA1_INCLUDED
|
||||
#define SHA1_INCLUDED
|
||||
|
||||
/* Copyright (C) 2002, 2006 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/*
|
||||
This is the header file for code which implements the Secure
|
||||
Hashing Algorithm 1 as defined in FIPS PUB 180-1 published
|
||||
April 17, 1995.
|
||||
|
||||
Many of the variable names in this code, especially the
|
||||
single character names, were used because those were the names
|
||||
used in the publication.
|
||||
|
||||
Please read the file sha1.c for more information.
|
||||
|
||||
Modified 2002 by Peter Zaitsev to better follow MySQL standards
|
||||
|
||||
Original Source from: http://www.faqs.org/rfcs/rfc3174.html
|
||||
|
||||
Copyright (C) The Internet Society (2001). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished to
|
||||
others, and derivative works that comment on or otherwise explain it
|
||||
or assist in its implementation may be prepared, copied, published
|
||||
and distributed, in whole or in part, without restriction of any
|
||||
kind, provided that the above copyright notice and this paragraph are
|
||||
included on all such copies and derivative works. However, this
|
||||
document itself may not be modified in any way, such as by removing
|
||||
the copyright notice or references to the Internet Society or other
|
||||
Internet organizations, except as needed for the purpose of
|
||||
developing Internet standards in which case the procedures for
|
||||
copyrights defined in the Internet Standards process must be
|
||||
followed, or as required to translate it into languages other than
|
||||
English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on an
|
||||
"AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
|
||||
TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
|
||||
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Acknowledgement
|
||||
Funding for the RFC Editor function is currently provided by the
|
||||
Internet Society.
|
||||
*/
|
||||
|
||||
|
||||
enum sha_result_codes
|
||||
{
|
||||
SHA_SUCCESS = 0,
|
||||
SHA_NULL, /* Null pointer parameter */
|
||||
SHA_INPUT_TOO_LONG, /* input data too long */
|
||||
SHA_STATE_ERROR /* called Input after Result */
|
||||
};
|
||||
|
||||
#define SHA1_HASH_SIZE 20 /* Hash size in bytes */
|
||||
|
||||
/*
|
||||
This structure will hold context information for the SHA-1
|
||||
hashing operation
|
||||
*/
|
||||
|
||||
typedef struct SHA1_CONTEXT
|
||||
{
|
||||
ulonglong Length; /* Message length in bits */
|
||||
uint32 Intermediate_Hash[SHA1_HASH_SIZE/4]; /* Message Digest */
|
||||
int Computed; /* Is the digest computed? */
|
||||
int Corrupted; /* Is the message digest corrupted? */
|
||||
int16 Message_Block_Index; /* Index into message block array */
|
||||
uint8 Message_Block[64]; /* 512-bit message blocks */
|
||||
} SHA1_CONTEXT;
|
||||
|
||||
/*
|
||||
Function Prototypes
|
||||
*/
|
||||
|
||||
C_MODE_START
|
||||
|
||||
int mysql_sha1_reset(SHA1_CONTEXT*);
|
||||
int mysql_sha1_input(SHA1_CONTEXT*, const uint8 *, unsigned int);
|
||||
int mysql_sha1_result(SHA1_CONTEXT* , uint8 Message_Digest[SHA1_HASH_SIZE]);
|
||||
|
||||
C_MODE_END
|
||||
|
||||
#endif /* SHA__INCLUDED */
|
||||
254
deps/mysqllite/include/internal/t_ctype.h
vendored
254
deps/mysqllite/include/internal/t_ctype.h
vendored
@@ -1,254 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved.
|
||||
Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved.
|
||||
Permission to use, copy, modify, distribute and sell this software
|
||||
and its documentation for any purpose is hereby granted without fee,
|
||||
provided that the above copyright notice appear in all copies.
|
||||
Smaphan Raruenrom and Pruet Boonma makes no representations about
|
||||
the suitability of this software for any purpose. It is provided
|
||||
"as is" without express or implied warranty.
|
||||
*/
|
||||
|
||||
/* LC_COLLATE category + Level information */
|
||||
|
||||
#ifndef _t_ctype_h
|
||||
#define _t_ctype_h
|
||||
|
||||
#define TOT_LEVELS 5
|
||||
#define LAST_LEVEL 4 /* TOT_LEVELS - 1 */
|
||||
|
||||
#define IGNORE 0
|
||||
|
||||
|
||||
/* level 1 symbols & order */
|
||||
enum l1_symbols {
|
||||
L1_08 = TOT_LEVELS,
|
||||
L1_18,
|
||||
L1_28,
|
||||
L1_38,
|
||||
L1_48,
|
||||
L1_58,
|
||||
L1_68,
|
||||
L1_78,
|
||||
L1_88,
|
||||
L1_98,
|
||||
L1_A8,
|
||||
L1_B8,
|
||||
L1_C8,
|
||||
L1_D8,
|
||||
L1_E8,
|
||||
L1_F8,
|
||||
L1_G8,
|
||||
L1_H8,
|
||||
L1_I8,
|
||||
L1_J8,
|
||||
L1_K8,
|
||||
L1_L8,
|
||||
L1_M8,
|
||||
L1_N8,
|
||||
L1_O8,
|
||||
L1_P8,
|
||||
L1_Q8,
|
||||
L1_R8,
|
||||
L1_S8,
|
||||
L1_T8,
|
||||
L1_U8,
|
||||
L1_V8,
|
||||
L1_W8,
|
||||
L1_X8,
|
||||
L1_Y8,
|
||||
L1_Z8,
|
||||
L1_KO_KAI,
|
||||
L1_KHO_KHAI,
|
||||
L1_KHO_KHUAT,
|
||||
L1_KHO_KHWAI,
|
||||
L1_KHO_KHON,
|
||||
L1_KHO_RAKHANG,
|
||||
L1_NGO_NGU,
|
||||
L1_CHO_CHAN,
|
||||
L1_CHO_CHING,
|
||||
L1_CHO_CHANG,
|
||||
L1_SO_SO,
|
||||
L1_CHO_CHOE,
|
||||
L1_YO_YING,
|
||||
L1_DO_CHADA,
|
||||
L1_TO_PATAK,
|
||||
L1_THO_THAN,
|
||||
L1_THO_NANGMONTHO,
|
||||
L1_THO_PHUTHAO,
|
||||
L1_NO_NEN,
|
||||
L1_DO_DEK,
|
||||
L1_TO_TAO,
|
||||
L1_THO_THUNG,
|
||||
L1_THO_THAHAN,
|
||||
L1_THO_THONG,
|
||||
L1_NO_NU,
|
||||
L1_BO_BAIMAI,
|
||||
L1_PO_PLA,
|
||||
L1_PHO_PHUNG,
|
||||
L1_FO_FA,
|
||||
L1_PHO_PHAN,
|
||||
L1_FO_FAN,
|
||||
L1_PHO_SAMPHAO,
|
||||
L1_MO_MA,
|
||||
L1_YO_YAK,
|
||||
L1_RO_RUA,
|
||||
L1_RU,
|
||||
L1_LO_LING,
|
||||
L1_LU,
|
||||
L1_WO_WAEN,
|
||||
L1_SO_SALA,
|
||||
L1_SO_RUSI,
|
||||
L1_SO_SUA,
|
||||
L1_HO_HIP,
|
||||
L1_LO_CHULA,
|
||||
L1_O_ANG,
|
||||
L1_HO_NOKHUK,
|
||||
L1_NKHIT,
|
||||
L1_SARA_A,
|
||||
L1_MAI_HAN_AKAT,
|
||||
L1_SARA_AA,
|
||||
L1_SARA_AM,
|
||||
L1_SARA_I,
|
||||
L1_SARA_II,
|
||||
L1_SARA_UE,
|
||||
L1_SARA_UEE,
|
||||
L1_SARA_U,
|
||||
L1_SARA_UU,
|
||||
L1_SARA_E,
|
||||
L1_SARA_AE,
|
||||
L1_SARA_O,
|
||||
L1_SARA_AI_MAIMUAN,
|
||||
L1_SARA_AI_MAIMALAI
|
||||
};
|
||||
|
||||
/* level 2 symbols & order */
|
||||
enum l2_symbols {
|
||||
L2_BLANK = TOT_LEVELS,
|
||||
L2_THAII,
|
||||
L2_YAMAK,
|
||||
L2_PINTHU,
|
||||
L2_GARAN,
|
||||
L2_TYKHU,
|
||||
L2_TONE1,
|
||||
L2_TONE2,
|
||||
L2_TONE3,
|
||||
L2_TONE4
|
||||
};
|
||||
|
||||
/* level 3 symbols & order */
|
||||
enum l3_symbols {
|
||||
L3_BLANK = TOT_LEVELS,
|
||||
L3_SPACE,
|
||||
L3_NB_SACE,
|
||||
L3_LOW_LINE,
|
||||
L3_HYPHEN,
|
||||
L3_COMMA,
|
||||
L3_SEMICOLON,
|
||||
L3_COLON,
|
||||
L3_EXCLAMATION,
|
||||
L3_QUESTION,
|
||||
L3_SOLIDUS,
|
||||
L3_FULL_STOP,
|
||||
L3_PAIYAN_NOI,
|
||||
L3_MAI_YAMOK,
|
||||
L3_GRAVE,
|
||||
L3_CIRCUMFLEX,
|
||||
L3_TILDE,
|
||||
L3_APOSTROPHE,
|
||||
L3_QUOTATION,
|
||||
L3_L_PARANTHESIS,
|
||||
L3_L_BRACKET,
|
||||
L3_L_BRACE,
|
||||
L3_R_BRACE,
|
||||
L3_R_BRACKET,
|
||||
L3_R_PARENTHESIS,
|
||||
L3_AT,
|
||||
L3_BAHT,
|
||||
L3_DOLLAR,
|
||||
L3_FONGMAN,
|
||||
L3_ANGKHANKHU,
|
||||
L3_KHOMUT,
|
||||
L3_ASTERISK,
|
||||
L3_BK_SOLIDUS,
|
||||
L3_AMPERSAND,
|
||||
L3_NUMBER,
|
||||
L3_PERCENT,
|
||||
L3_PLUS,
|
||||
L3_LESS_THAN,
|
||||
L3_EQUAL,
|
||||
L3_GREATER_THAN,
|
||||
L3_V_LINE
|
||||
};
|
||||
|
||||
/* level 4 symbols & order */
|
||||
enum l4_symbols {
|
||||
L4_BLANK = TOT_LEVELS,
|
||||
L4_MIN,
|
||||
L4_CAP,
|
||||
L4_EXT
|
||||
};
|
||||
|
||||
enum level_symbols {
|
||||
L_UPRUPR = TOT_LEVELS,
|
||||
L_UPPER,
|
||||
L_MIDDLE,
|
||||
L_LOWER
|
||||
};
|
||||
|
||||
#define _is(c) (t_ctype[(c)][LAST_LEVEL])
|
||||
#define _level 8
|
||||
#define _consnt 16
|
||||
#define _ldvowel 32
|
||||
#define _fllwvowel 64
|
||||
#define _uprvowel 128
|
||||
#define _lwrvowel 256
|
||||
#define _tone 512
|
||||
#define _diacrt1 1024
|
||||
#define _diacrt2 2048
|
||||
#define _combine 4096
|
||||
#define _stone 8192
|
||||
#define _tdig 16384
|
||||
#define _rearvowel (_fllwvowel | _uprvowel | _lwrvowel)
|
||||
#define _diacrt (_diacrt1 | _diacrt2)
|
||||
#define levelof(c) ( _is(c) & _level )
|
||||
#define isthai(c) ( (c) >= 128 )
|
||||
#define istalpha(c) ( _is(c) & (_consnt|_ldvowel|_rearvowel|\
|
||||
_tone|_diacrt1|_diacrt2) )
|
||||
#define isconsnt(c) ( _is(c) & _consnt )
|
||||
#define isldvowel(c) ( _is(c) & _ldvowel )
|
||||
#define isfllwvowel(c) ( _is(c) & _fllwvowel )
|
||||
#define ismidvowel(c) ( _is(c) & (_ldvowel|_fllwvowel) )
|
||||
#define isuprvowel(c) ( _is(c) & _uprvowel )
|
||||
#define islwrvowel(c) ( _is(c) & _lwrvowel )
|
||||
#define isuprlwrvowel(c) ( _is(c) & (_lwrvowel | _uprvowel))
|
||||
#define isrearvowel(c) ( _is(c) & _rearvowel )
|
||||
#define isvowel(c) ( _is(c) & (_ldvowel|_rearvowel) )
|
||||
#define istone(c) ( _is(c) & _tone )
|
||||
#define isunldable(c) ( _is(c) & (_rearvowel|_tone|_diacrt1|_diacrt2) )
|
||||
#define iscombinable(c) ( _is(c) & _combine )
|
||||
#define istdigit(c) ( _is(c) & _tdig )
|
||||
#define isstone(c) ( _is(c) & _stone )
|
||||
#define isdiacrt1(c) ( _is(c) & _diacrt1)
|
||||
#define isdiacrt2(c) ( _is(c) & _diacrt2)
|
||||
#define isdiacrt(c) ( _is(c) & _diacrt)
|
||||
|
||||
/* Function prototype called by sql/field.cc */
|
||||
void ThNormalize(uchar* ptr, uint field_length, const uchar* from, uint length);
|
||||
|
||||
#endif
|
||||
110
deps/mysqllite/include/internal/thr_alarm.h
vendored
110
deps/mysqllite/include/internal/thr_alarm.h
vendored
@@ -1,110 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Prototypes when using thr_alarm library functions */
|
||||
|
||||
#ifndef _thr_alarm_h
|
||||
#define _thr_alarm_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef USE_ALARM_THREAD
|
||||
#define USE_ONE_SIGNAL_HAND /* One must call process_alarm */
|
||||
#endif
|
||||
#ifdef HAVE_rts_threads
|
||||
#undef USE_ONE_SIGNAL_HAND
|
||||
#define USE_ALARM_THREAD
|
||||
#define THR_SERVER_ALARM SIGUSR1
|
||||
#else
|
||||
#define THR_SERVER_ALARM SIGALRM
|
||||
#endif
|
||||
|
||||
typedef struct st_alarm_info
|
||||
{
|
||||
ulong next_alarm_time;
|
||||
uint active_alarms;
|
||||
uint max_used_alarms;
|
||||
} ALARM_INFO;
|
||||
|
||||
void thr_alarm_info(ALARM_INFO *info);
|
||||
|
||||
#if defined(DONT_USE_THR_ALARM)
|
||||
|
||||
#define USE_ALARM_THREAD
|
||||
#undef USE_ONE_SIGNAL_HAND
|
||||
|
||||
typedef my_bool thr_alarm_t;
|
||||
typedef my_bool ALARM;
|
||||
|
||||
#define thr_alarm_init(A) (*(A))=0
|
||||
#define thr_alarm_in_use(A) (*(A) != 0)
|
||||
#define thr_end_alarm(A)
|
||||
#define thr_alarm(A,B,C) ((*(A)=1)-1)
|
||||
/* The following should maybe be (*(A)) */
|
||||
#define thr_got_alarm(A) 0
|
||||
#define init_thr_alarm(A)
|
||||
#define thr_alarm_kill(A)
|
||||
#define resize_thr_alarm(N)
|
||||
#define end_thr_alarm(A)
|
||||
|
||||
#else
|
||||
#if defined(__WIN__)
|
||||
typedef struct st_thr_alarm_entry
|
||||
{
|
||||
UINT_PTR crono;
|
||||
} thr_alarm_entry;
|
||||
|
||||
#else /* System with posix threads */
|
||||
|
||||
typedef int thr_alarm_entry;
|
||||
|
||||
#define thr_got_alarm(thr_alarm) (**(thr_alarm))
|
||||
|
||||
#endif /* __WIN__ */
|
||||
|
||||
typedef thr_alarm_entry* thr_alarm_t;
|
||||
|
||||
typedef struct st_alarm {
|
||||
ulong expire_time;
|
||||
thr_alarm_entry alarmed; /* set when alarm is due */
|
||||
pthread_t thread;
|
||||
my_thread_id thread_id;
|
||||
my_bool malloced;
|
||||
} ALARM;
|
||||
|
||||
extern uint thr_client_alarm;
|
||||
extern pthread_t alarm_thread;
|
||||
|
||||
#define thr_alarm_init(A) (*(A))=0
|
||||
#define thr_alarm_in_use(A) (*(A)!= 0)
|
||||
void init_thr_alarm(uint max_alarm);
|
||||
void resize_thr_alarm(uint max_alarms);
|
||||
my_bool thr_alarm(thr_alarm_t *alarmed, uint sec, ALARM *buff);
|
||||
void thr_alarm_kill(my_thread_id thread_id);
|
||||
void thr_end_alarm(thr_alarm_t *alarmed);
|
||||
void end_thr_alarm(my_bool free_structures);
|
||||
sig_handler process_alarm(int);
|
||||
#ifndef thr_got_alarm
|
||||
my_bool thr_got_alarm(thr_alarm_t *alrm);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* DONT_USE_THR_ALARM */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
#endif /* _thr_alarm_h */
|
||||
163
deps/mysqllite/include/internal/thr_lock.h
vendored
163
deps/mysqllite/include/internal/thr_lock.h
vendored
@@ -1,163 +0,0 @@
|
||||
/* Copyright 2000-2008 MySQL AB, 2008-2009 Sun Microsystems, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* For use with thr_lock:s */
|
||||
|
||||
#ifndef _thr_lock_h
|
||||
#define _thr_lock_h
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <my_pthread.h>
|
||||
#include <my_list.h>
|
||||
|
||||
struct st_thr_lock;
|
||||
extern ulong locks_immediate,locks_waited ;
|
||||
|
||||
/*
|
||||
Important: if a new lock type is added, a matching lock description
|
||||
must be added to sql_test.cc's lock_descriptions array.
|
||||
*/
|
||||
enum thr_lock_type { TL_IGNORE=-1,
|
||||
TL_UNLOCK, /* UNLOCK ANY LOCK */
|
||||
/*
|
||||
Parser only! At open_tables() becomes TL_READ or
|
||||
TL_READ_NO_INSERT depending on the binary log format
|
||||
(SBR/RBR) and on the table category (log table).
|
||||
Used for tables that are read by statements which
|
||||
modify tables.
|
||||
*/
|
||||
TL_READ_DEFAULT,
|
||||
TL_READ, /* Read lock */
|
||||
TL_READ_WITH_SHARED_LOCKS,
|
||||
/* High prior. than TL_WRITE. Allow concurrent insert */
|
||||
TL_READ_HIGH_PRIORITY,
|
||||
/* READ, Don't allow concurrent insert */
|
||||
TL_READ_NO_INSERT,
|
||||
/*
|
||||
Write lock, but allow other threads to read / write.
|
||||
Used by BDB tables in MySQL to mark that someone is
|
||||
reading/writing to the table.
|
||||
*/
|
||||
TL_WRITE_ALLOW_WRITE,
|
||||
/*
|
||||
WRITE lock used by concurrent insert. Will allow
|
||||
READ, if one could use concurrent insert on table.
|
||||
*/
|
||||
TL_WRITE_CONCURRENT_INSERT,
|
||||
/* Write used by INSERT DELAYED. Allows READ locks */
|
||||
TL_WRITE_DELAYED,
|
||||
/*
|
||||
parser only! Late bound low_priority flag.
|
||||
At open_tables() becomes thd->update_lock_default.
|
||||
*/
|
||||
TL_WRITE_DEFAULT,
|
||||
/* WRITE lock that has lower priority than TL_READ */
|
||||
TL_WRITE_LOW_PRIORITY,
|
||||
/* Normal WRITE lock */
|
||||
TL_WRITE,
|
||||
/* Abort new lock request with an error */
|
||||
TL_WRITE_ONLY};
|
||||
|
||||
enum enum_thr_lock_result { THR_LOCK_SUCCESS= 0, THR_LOCK_ABORTED= 1,
|
||||
THR_LOCK_WAIT_TIMEOUT= 2, THR_LOCK_DEADLOCK= 3 };
|
||||
|
||||
|
||||
extern ulong max_write_lock_count;
|
||||
extern my_bool thr_lock_inited;
|
||||
extern enum thr_lock_type thr_upgraded_concurrent_insert_lock;
|
||||
|
||||
/*
|
||||
A description of the thread which owns the lock. The address
|
||||
of an instance of this structure is used to uniquely identify the thread.
|
||||
*/
|
||||
|
||||
typedef struct st_thr_lock_info
|
||||
{
|
||||
pthread_t thread;
|
||||
my_thread_id thread_id;
|
||||
} THR_LOCK_INFO;
|
||||
|
||||
|
||||
typedef struct st_thr_lock_data {
|
||||
THR_LOCK_INFO *owner;
|
||||
struct st_thr_lock_data *next,**prev;
|
||||
struct st_thr_lock *lock;
|
||||
mysql_cond_t *cond;
|
||||
enum thr_lock_type type;
|
||||
void *status_param; /* Param to status functions */
|
||||
void *debug_print_param;
|
||||
struct PSI_table *m_psi;
|
||||
} THR_LOCK_DATA;
|
||||
|
||||
struct st_lock_list {
|
||||
THR_LOCK_DATA *data,**last;
|
||||
};
|
||||
|
||||
typedef struct st_thr_lock {
|
||||
LIST list;
|
||||
mysql_mutex_t mutex;
|
||||
struct st_lock_list read_wait;
|
||||
struct st_lock_list read;
|
||||
struct st_lock_list write_wait;
|
||||
struct st_lock_list write;
|
||||
/* write_lock_count is incremented for write locks and reset on read locks */
|
||||
ulong write_lock_count;
|
||||
uint read_no_write_count;
|
||||
void (*get_status)(void*, int); /* When one gets a lock */
|
||||
void (*copy_status)(void*,void*);
|
||||
void (*update_status)(void*); /* Before release of write */
|
||||
void (*restore_status)(void*); /* Before release of read */
|
||||
my_bool (*check_status)(void *);
|
||||
} THR_LOCK;
|
||||
|
||||
|
||||
extern LIST *thr_lock_thread_list;
|
||||
extern mysql_mutex_t THR_LOCK_lock;
|
||||
|
||||
my_bool init_thr_lock(void); /* Must be called once/thread */
|
||||
void thr_lock_info_init(THR_LOCK_INFO *info);
|
||||
void thr_lock_init(THR_LOCK *lock);
|
||||
void thr_lock_delete(THR_LOCK *lock);
|
||||
void thr_lock_data_init(THR_LOCK *lock,THR_LOCK_DATA *data,
|
||||
void *status_param);
|
||||
enum enum_thr_lock_result thr_lock(THR_LOCK_DATA *data,
|
||||
THR_LOCK_INFO *owner,
|
||||
enum thr_lock_type lock_type,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_unlock(THR_LOCK_DATA *data);
|
||||
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
|
||||
uint count, THR_LOCK_INFO *owner,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
|
||||
void
|
||||
thr_lock_merge_status(THR_LOCK_DATA **data, uint count);
|
||||
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
|
||||
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
|
||||
void thr_print_locks(void); /* For debugging */
|
||||
my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data,
|
||||
enum thr_lock_type new_lock_type,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_downgrade_write_lock(THR_LOCK_DATA *data,
|
||||
enum thr_lock_type new_lock_type);
|
||||
my_bool thr_reschedule_write_lock(THR_LOCK_DATA *data,
|
||||
ulong lock_wait_timeout);
|
||||
void thr_set_lock_wait_callback(void (*before_wait)(void),
|
||||
void (*after_wait)(void));
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* _thr_lock_h */
|
||||
241
deps/mysqllite/include/internal/violite.h
vendored
241
deps/mysqllite/include/internal/violite.h
vendored
@@ -1,241 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
* Vio Lite.
|
||||
* Purpose: include file for Vio that will work with C and C++
|
||||
*/
|
||||
|
||||
#ifndef vio_violite_h_
|
||||
#define vio_violite_h_
|
||||
|
||||
#include "my_net.h" /* needed because of struct in_addr */
|
||||
|
||||
|
||||
/* Simple vio interface in C; The functions are implemented in violite.c */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#ifdef __cplusplus
|
||||
typedef struct st_vio Vio;
|
||||
#endif /* __cplusplus */
|
||||
|
||||
enum enum_vio_type
|
||||
{
|
||||
VIO_CLOSED, VIO_TYPE_TCPIP, VIO_TYPE_SOCKET, VIO_TYPE_NAMEDPIPE,
|
||||
VIO_TYPE_SSL, VIO_TYPE_SHARED_MEMORY
|
||||
};
|
||||
|
||||
|
||||
#define VIO_LOCALHOST 1 /* a localhost connection */
|
||||
#define VIO_BUFFERED_READ 2 /* use buffered read */
|
||||
#define VIO_READ_BUFFER_SIZE 16384 /* size of read buffer */
|
||||
|
||||
Vio* vio_new(my_socket sd, enum enum_vio_type type, uint flags);
|
||||
#ifdef __WIN__
|
||||
Vio* vio_new_win32pipe(HANDLE hPipe);
|
||||
Vio* vio_new_win32shared_memory(HANDLE handle_file_map,
|
||||
HANDLE handle_map,
|
||||
HANDLE event_server_wrote,
|
||||
HANDLE event_server_read,
|
||||
HANDLE event_client_wrote,
|
||||
HANDLE event_client_read,
|
||||
HANDLE event_conn_closed);
|
||||
#else
|
||||
#define HANDLE void *
|
||||
#endif /* __WIN__ */
|
||||
|
||||
void vio_delete(Vio* vio);
|
||||
int vio_close(Vio* vio);
|
||||
void vio_reset(Vio* vio, enum enum_vio_type type,
|
||||
my_socket sd, HANDLE hPipe, uint flags);
|
||||
size_t vio_read(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_read_buff(Vio *vio, uchar * buf, size_t size);
|
||||
size_t vio_write(Vio *vio, const uchar * buf, size_t size);
|
||||
int vio_blocking(Vio *vio, my_bool onoff, my_bool *old_mode);
|
||||
my_bool vio_is_blocking(Vio *vio);
|
||||
/* setsockopt TCP_NODELAY at IPPROTO_TCP level, when possible */
|
||||
int vio_fastsend(Vio *vio);
|
||||
/* setsockopt SO_KEEPALIVE at SOL_SOCKET level, when possible */
|
||||
int vio_keepalive(Vio *vio, my_bool onoff);
|
||||
/* Whenever we should retry the last read/write operation. */
|
||||
my_bool vio_should_retry(Vio *vio);
|
||||
/* Check that operation was timed out */
|
||||
my_bool vio_was_interrupted(Vio *vio);
|
||||
/* Short text description of the socket for those, who are curious.. */
|
||||
const char* vio_description(Vio *vio);
|
||||
/* Return the type of the connection */
|
||||
enum enum_vio_type vio_type(Vio* vio);
|
||||
/* Return last error number */
|
||||
int vio_errno(Vio*vio);
|
||||
/* Get socket number */
|
||||
my_socket vio_fd(Vio*vio);
|
||||
/* Remote peer's address and name in text form */
|
||||
my_bool vio_peer_addr(Vio *vio, char *buf, uint16 *port, size_t buflen);
|
||||
my_bool vio_poll_read(Vio *vio, uint timeout);
|
||||
my_bool vio_is_connected(Vio *vio);
|
||||
ssize_t vio_pending(Vio *vio);
|
||||
|
||||
my_bool vio_get_normalized_ip_string(const struct sockaddr *addr, int addr_length,
|
||||
char *ip_string, size_t ip_string_size);
|
||||
|
||||
int vio_getnameinfo(const struct sockaddr *sa,
|
||||
char *hostname, size_t hostname_size,
|
||||
char *port, size_t port_size,
|
||||
int flags);
|
||||
|
||||
#ifdef HAVE_OPENSSL
|
||||
#include <openssl/opensslv.h>
|
||||
#if OPENSSL_VERSION_NUMBER < 0x0090700f
|
||||
#define DES_cblock des_cblock
|
||||
#define DES_key_schedule des_key_schedule
|
||||
#define DES_set_key_unchecked(k,ks) des_set_key_unchecked((k),*(ks))
|
||||
#define DES_ede3_cbc_encrypt(i,o,l,k1,k2,k3,iv,e) des_ede3_cbc_encrypt((i),(o),(l),*(k1),*(k2),*(k3),(iv),(e))
|
||||
#endif
|
||||
|
||||
#define HEADER_DES_LOCL_H dummy_something
|
||||
#define YASSL_MYSQL_COMPATIBLE
|
||||
#ifndef YASSL_PREFIX
|
||||
#define YASSL_PREFIX
|
||||
#endif
|
||||
/* Set yaSSL to use same type as MySQL do for socket handles */
|
||||
typedef my_socket YASSL_SOCKET_T;
|
||||
#define YASSL_SOCKET_T_DEFINED
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/err.h>
|
||||
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
enum enum_ssl_init_error
|
||||
{
|
||||
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
|
||||
SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
|
||||
SSL_INITERR_MEMFAIL, SSL_INITERR_LASTERR
|
||||
};
|
||||
const char* sslGetErrString(enum enum_ssl_init_error err);
|
||||
|
||||
struct st_VioSSLFd
|
||||
{
|
||||
SSL_CTX *ssl_context;
|
||||
};
|
||||
|
||||
int sslaccept(struct st_VioSSLFd*, Vio *, long timeout);
|
||||
int sslconnect(struct st_VioSSLFd*, Vio *, long timeout);
|
||||
|
||||
struct st_VioSSLFd
|
||||
*new_VioSSLConnectorFd(const char *key_file, const char *cert_file,
|
||||
const char *ca_file, const char *ca_path,
|
||||
const char *cipher);
|
||||
struct st_VioSSLFd
|
||||
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
|
||||
const char *ca_file,const char *ca_path,
|
||||
const char *cipher, enum enum_ssl_init_error* error);
|
||||
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
|
||||
#endif /* ! EMBEDDED_LIBRARY */
|
||||
#endif /* HAVE_OPENSSL */
|
||||
|
||||
void vio_end(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#if !defined(DONT_MAP_VIO)
|
||||
#define vio_delete(vio) (vio)->viodelete(vio)
|
||||
#define vio_errno(vio) (vio)->vioerrno(vio)
|
||||
#define vio_read(vio, buf, size) ((vio)->read)(vio,buf,size)
|
||||
#define vio_write(vio, buf, size) ((vio)->write)(vio, buf, size)
|
||||
#define vio_blocking(vio, set_blocking_mode, old_mode)\
|
||||
(vio)->vioblocking(vio, set_blocking_mode, old_mode)
|
||||
#define vio_is_blocking(vio) (vio)->is_blocking(vio)
|
||||
#define vio_fastsend(vio) (vio)->fastsend(vio)
|
||||
#define vio_keepalive(vio, set_keep_alive) (vio)->viokeepalive(vio, set_keep_alive)
|
||||
#define vio_should_retry(vio) (vio)->should_retry(vio)
|
||||
#define vio_was_interrupted(vio) (vio)->was_interrupted(vio)
|
||||
#define vio_close(vio) ((vio)->vioclose)(vio)
|
||||
#define vio_peer_addr(vio, buf, prt, buflen) (vio)->peer_addr(vio, buf, prt, buflen)
|
||||
#define vio_timeout(vio, which, seconds) (vio)->timeout(vio, which, seconds)
|
||||
#define vio_poll_read(vio, timeout) (vio)->poll_read(vio, timeout)
|
||||
#define vio_is_connected(vio) (vio)->is_connected(vio)
|
||||
#endif /* !defined(DONT_MAP_VIO) */
|
||||
|
||||
/* This enumerator is used in parser - should be always visible */
|
||||
enum SSL_type
|
||||
{
|
||||
SSL_TYPE_NOT_SPECIFIED= -1,
|
||||
SSL_TYPE_NONE,
|
||||
SSL_TYPE_ANY,
|
||||
SSL_TYPE_X509,
|
||||
SSL_TYPE_SPECIFIED
|
||||
};
|
||||
|
||||
|
||||
/* HFTODO - hide this if we don't want client in embedded server */
|
||||
/* This structure is for every connection on both sides */
|
||||
struct st_vio
|
||||
{
|
||||
my_socket sd; /* my_socket - real or imaginary */
|
||||
HANDLE hPipe;
|
||||
my_bool localhost; /* Are we from localhost? */
|
||||
int fcntl_mode; /* Buffered fcntl(sd,F_GETFL) */
|
||||
struct sockaddr_storage local; /* Local internet address */
|
||||
struct sockaddr_storage remote; /* Remote internet address */
|
||||
int addrLen; /* Length of remote address */
|
||||
enum enum_vio_type type; /* Type of connection */
|
||||
char desc[30]; /* String description */
|
||||
char *read_buffer; /* buffer for vio_read_buff */
|
||||
char *read_pos; /* start of unfetched data in the
|
||||
read buffer */
|
||||
char *read_end; /* end of unfetched data */
|
||||
/* function pointers. They are similar for socket/SSL/whatever */
|
||||
void (*viodelete)(Vio*);
|
||||
int (*vioerrno)(Vio*);
|
||||
size_t (*read)(Vio*, uchar *, size_t);
|
||||
size_t (*write)(Vio*, const uchar *, size_t);
|
||||
int (*vioblocking)(Vio*, my_bool, my_bool *);
|
||||
my_bool (*is_blocking)(Vio*);
|
||||
int (*viokeepalive)(Vio*, my_bool);
|
||||
int (*fastsend)(Vio*);
|
||||
my_bool (*peer_addr)(Vio*, char *, uint16*, size_t);
|
||||
void (*in_addr)(Vio*, struct sockaddr_storage*);
|
||||
my_bool (*should_retry)(Vio*);
|
||||
my_bool (*was_interrupted)(Vio*);
|
||||
int (*vioclose)(Vio*);
|
||||
void (*timeout)(Vio*, unsigned int which, unsigned int timeout);
|
||||
my_bool (*poll_read)(Vio *vio, uint timeout);
|
||||
my_bool (*is_connected)(Vio*);
|
||||
my_bool (*has_data) (Vio*);
|
||||
#ifdef HAVE_OPENSSL
|
||||
void *ssl_arg;
|
||||
#endif
|
||||
#ifdef HAVE_SMEM
|
||||
HANDLE handle_file_map;
|
||||
char *handle_map;
|
||||
HANDLE event_server_wrote;
|
||||
HANDLE event_server_read;
|
||||
HANDLE event_client_wrote;
|
||||
HANDLE event_client_read;
|
||||
HANDLE event_conn_closed;
|
||||
size_t shared_memory_remain;
|
||||
char *shared_memory_pos;
|
||||
#endif /* HAVE_SMEM */
|
||||
#ifdef _WIN32
|
||||
OVERLAPPED pipe_overlapped;
|
||||
DWORD read_timeout_ms;
|
||||
DWORD write_timeout_ms;
|
||||
#endif
|
||||
};
|
||||
#endif /* vio_violite_h_ */
|
||||
146
deps/mysqllite/include/keycache.h
vendored
146
deps/mysqllite/include/keycache.h
vendored
@@ -1,146 +0,0 @@
|
||||
/* Copyright (C) 2003 MySQL AB, 2009 Sun Microsystems, Inc
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Key cache variable structures */
|
||||
|
||||
#ifndef _keycache_h
|
||||
#define _keycache_h
|
||||
|
||||
#include "my_sys.h" /* flush_type */
|
||||
|
||||
C_MODE_START
|
||||
|
||||
/* declare structures that is used by st_key_cache */
|
||||
|
||||
struct st_block_link;
|
||||
typedef struct st_block_link BLOCK_LINK;
|
||||
struct st_keycache_page;
|
||||
typedef struct st_keycache_page KEYCACHE_PAGE;
|
||||
struct st_hash_link;
|
||||
typedef struct st_hash_link HASH_LINK;
|
||||
|
||||
/* info about requests in a waiting queue */
|
||||
typedef struct st_keycache_wqueue
|
||||
{
|
||||
struct st_my_thread_var *last_thread; /* circular list of waiting threads */
|
||||
} KEYCACHE_WQUEUE;
|
||||
|
||||
#define CHANGED_BLOCKS_HASH 128 /* must be power of 2 */
|
||||
|
||||
/*
|
||||
The key cache structure
|
||||
It also contains read-only statistics parameters.
|
||||
*/
|
||||
|
||||
typedef struct st_key_cache
|
||||
{
|
||||
my_bool key_cache_inited;
|
||||
my_bool in_resize; /* true during resize operation */
|
||||
my_bool resize_in_flush; /* true during flush of resize operation */
|
||||
my_bool can_be_used; /* usage of cache for read/write is allowed */
|
||||
size_t key_cache_mem_size; /* specified size of the cache memory */
|
||||
uint key_cache_block_size; /* size of the page buffer of a cache block */
|
||||
ulong min_warm_blocks; /* min number of warm blocks; */
|
||||
ulong age_threshold; /* age threshold for hot blocks */
|
||||
ulonglong keycache_time; /* total number of block link operations */
|
||||
uint hash_entries; /* max number of entries in the hash table */
|
||||
int hash_links; /* max number of hash links */
|
||||
int hash_links_used; /* number of hash links currently used */
|
||||
int disk_blocks; /* max number of blocks in the cache */
|
||||
ulong blocks_used; /* maximum number of concurrently used blocks */
|
||||
ulong blocks_unused; /* number of currently unused blocks */
|
||||
ulong blocks_changed; /* number of currently dirty blocks */
|
||||
ulong warm_blocks; /* number of blocks in warm sub-chain */
|
||||
ulong cnt_for_resize_op; /* counter to block resize operation */
|
||||
long blocks_available; /* number of blocks available in the LRU chain */
|
||||
HASH_LINK **hash_root; /* arr. of entries into hash table buckets */
|
||||
HASH_LINK *hash_link_root; /* memory for hash table links */
|
||||
HASH_LINK *free_hash_list; /* list of free hash links */
|
||||
BLOCK_LINK *free_block_list; /* list of free blocks */
|
||||
BLOCK_LINK *block_root; /* memory for block links */
|
||||
uchar *block_mem; /* memory for block buffers */
|
||||
BLOCK_LINK *used_last; /* ptr to the last block of the LRU chain */
|
||||
BLOCK_LINK *used_ins; /* ptr to the insertion block in LRU chain */
|
||||
mysql_mutex_t cache_lock; /* to lock access to the cache structure */
|
||||
KEYCACHE_WQUEUE resize_queue; /* threads waiting during resize operation */
|
||||
/*
|
||||
Waiting for a zero resize count. Using a queue for symmetry though
|
||||
only one thread can wait here.
|
||||
*/
|
||||
KEYCACHE_WQUEUE waiting_for_resize_cnt;
|
||||
KEYCACHE_WQUEUE waiting_for_hash_link; /* waiting for a free hash link */
|
||||
KEYCACHE_WQUEUE waiting_for_block; /* requests waiting for a free block */
|
||||
BLOCK_LINK *changed_blocks[CHANGED_BLOCKS_HASH]; /* hash for dirty file bl.*/
|
||||
BLOCK_LINK *file_blocks[CHANGED_BLOCKS_HASH]; /* hash for other file bl.*/
|
||||
|
||||
/*
|
||||
The following variables are and variables used to hold parameters for
|
||||
initializing the key cache.
|
||||
*/
|
||||
|
||||
ulonglong param_buff_size; /* size the memory allocated for the cache */
|
||||
ulonglong param_block_size; /* size of the blocks in the key cache */
|
||||
ulonglong param_division_limit; /* min. percentage of warm blocks */
|
||||
ulonglong param_age_threshold; /* determines when hot block is downgraded */
|
||||
|
||||
/* Statistics variables. These are reset in reset_key_cache_counters(). */
|
||||
ulong global_blocks_changed; /* number of currently dirty blocks */
|
||||
ulonglong global_cache_w_requests;/* number of write requests (write hits) */
|
||||
ulonglong global_cache_write; /* number of writes from cache to files */
|
||||
ulonglong global_cache_r_requests;/* number of read requests (read hits) */
|
||||
ulonglong global_cache_read; /* number of reads from files to cache */
|
||||
|
||||
int blocks; /* max number of blocks in the cache */
|
||||
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
||||
} KEY_CACHE;
|
||||
|
||||
/* The default key cache */
|
||||
extern KEY_CACHE dflt_key_cache_var, *dflt_key_cache;
|
||||
|
||||
extern int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern int resize_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
|
||||
size_t use_mem, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
|
||||
uint age_threshold);
|
||||
extern uchar *key_cache_read(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int return_buffer);
|
||||
extern int key_cache_insert(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length);
|
||||
extern int key_cache_write(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length,int force_write);
|
||||
extern int flush_key_blocks(KEY_CACHE *keycache,
|
||||
int file, enum flush_type type);
|
||||
extern void end_key_cache(KEY_CACHE *keycache, my_bool cleanup);
|
||||
|
||||
/* Functions to handle multiple key caches */
|
||||
extern my_bool multi_keycache_init(void);
|
||||
extern void multi_keycache_free(void);
|
||||
extern KEY_CACHE *multi_key_cache_search(uchar *key, uint length);
|
||||
extern my_bool multi_key_cache_set(const uchar *key, uint length,
|
||||
KEY_CACHE *key_cache);
|
||||
extern void multi_key_cache_change(KEY_CACHE *old_data,
|
||||
KEY_CACHE *new_data);
|
||||
extern int reset_key_cache_counters(const char *name,
|
||||
KEY_CACHE *key_cache);
|
||||
C_MODE_END
|
||||
#endif /* _keycache_h */
|
||||
660
deps/mysqllite/include/m_ctype.h
vendored
660
deps/mysqllite/include/m_ctype.h
vendored
@@ -1,660 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
A better inplementation of the UNIX ctype(3) library.
|
||||
*/
|
||||
|
||||
#ifndef _m_ctype_h
|
||||
#define _m_ctype_h
|
||||
|
||||
#include <my_attribute.h>
|
||||
#include "my_global.h" /* uint16, uchar */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MY_CS_NAME_SIZE 32
|
||||
#define MY_CS_CTYPE_TABLE_SIZE 257
|
||||
#define MY_CS_TO_LOWER_TABLE_SIZE 256
|
||||
#define MY_CS_TO_UPPER_TABLE_SIZE 256
|
||||
#define MY_CS_SORT_ORDER_TABLE_SIZE 256
|
||||
#define MY_CS_TO_UNI_TABLE_SIZE 256
|
||||
|
||||
#define CHARSET_DIR "charsets/"
|
||||
|
||||
#define my_wc_t ulong
|
||||
|
||||
#define MY_CS_REPLACEMENT_CHARACTER 0xFFFD
|
||||
|
||||
/*
|
||||
On i386 we store Unicode->CS conversion tables for
|
||||
some character sets using Big-endian order,
|
||||
to copy two bytes at onces.
|
||||
This gives some performance improvement.
|
||||
*/
|
||||
#ifdef __i386__
|
||||
#define MB2(x) (((x) >> 8) + (((x) & 0xFF) << 8))
|
||||
#define MY_PUT_MB2(s, code) { *((uint16*)(s))= (code); }
|
||||
#else
|
||||
#define MB2(x) (x)
|
||||
#define MY_PUT_MB2(s, code) { (s)[0]= code >> 8; (s)[1]= code & 0xFF; }
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
typedef struct unicase_info_st
|
||||
{
|
||||
uint32 toupper;
|
||||
uint32 tolower;
|
||||
uint32 sort;
|
||||
} MY_UNICASE_INFO;
|
||||
|
||||
|
||||
extern MY_UNICASE_INFO *my_unicase_default[256];
|
||||
extern MY_UNICASE_INFO *my_unicase_turkish[256];
|
||||
|
||||
typedef struct uni_ctype_st
|
||||
{
|
||||
uchar pctype;
|
||||
uchar *ctype;
|
||||
} MY_UNI_CTYPE;
|
||||
|
||||
extern MY_UNI_CTYPE my_uni_ctype[256];
|
||||
|
||||
/* wm_wc and wc_mb return codes */
|
||||
#define MY_CS_ILSEQ 0 /* Wrong by sequence: wb_wc */
|
||||
#define MY_CS_ILUNI 0 /* Cannot encode Unicode to charset: wc_mb */
|
||||
#define MY_CS_TOOSMALL -101 /* Need at least one byte: wc_mb and mb_wc */
|
||||
#define MY_CS_TOOSMALL2 -102 /* Need at least two bytes: wc_mb and mb_wc */
|
||||
#define MY_CS_TOOSMALL3 -103 /* Need at least three bytes: wc_mb and mb_wc */
|
||||
/* These following three are currently not really used */
|
||||
#define MY_CS_TOOSMALL4 -104 /* Need at least 4 bytes: wc_mb and mb_wc */
|
||||
#define MY_CS_TOOSMALL5 -105 /* Need at least 5 bytes: wc_mb and mb_wc */
|
||||
#define MY_CS_TOOSMALL6 -106 /* Need at least 6 bytes: wc_mb and mb_wc */
|
||||
/* A helper macros for "need at least n bytes" */
|
||||
#define MY_CS_TOOSMALLN(n) (-100-(n))
|
||||
|
||||
#define MY_SEQ_INTTAIL 1
|
||||
#define MY_SEQ_SPACES 2
|
||||
|
||||
/* My charsets_list flags */
|
||||
#define MY_CS_COMPILED 1 /* compiled-in sets */
|
||||
#define MY_CS_CONFIG 2 /* sets that have a *.conf file */
|
||||
#define MY_CS_INDEX 4 /* sets listed in the Index file */
|
||||
#define MY_CS_LOADED 8 /* sets that are currently loaded */
|
||||
#define MY_CS_BINSORT 16 /* if binary sort order */
|
||||
#define MY_CS_PRIMARY 32 /* if primary collation */
|
||||
#define MY_CS_STRNXFRM 64 /* if strnxfrm is used for sort */
|
||||
#define MY_CS_UNICODE 128 /* is a charset is BMP Unicode */
|
||||
#define MY_CS_READY 256 /* if a charset is initialized */
|
||||
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
|
||||
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
|
||||
#define MY_CS_HIDDEN 2048 /* don't display in SHOW */
|
||||
#define MY_CS_PUREASCII 4096 /* if a charset is pure ascii */
|
||||
#define MY_CS_NONASCII 8192 /* if not ASCII-compatible */
|
||||
#define MY_CS_UNICODE_SUPPLEMENT 16384 /* Non-BMP Unicode characters */
|
||||
#define MY_CHARSET_UNDEFINED 0
|
||||
|
||||
/* Character repertoire flags */
|
||||
#define MY_REPERTOIRE_ASCII 1 /* Pure ASCII U+0000..U+007F */
|
||||
#define MY_REPERTOIRE_EXTENDED 2 /* Extended characters: U+0080..U+FFFF */
|
||||
#define MY_REPERTOIRE_UNICODE30 3 /* ASCII | EXTENDED: U+0000..U+FFFF */
|
||||
|
||||
typedef struct my_uni_idx_st
|
||||
{
|
||||
uint16 from;
|
||||
uint16 to;
|
||||
uchar *tab;
|
||||
} MY_UNI_IDX;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint beg;
|
||||
uint end;
|
||||
uint mb_len;
|
||||
} my_match_t;
|
||||
|
||||
enum my_lex_states
|
||||
{
|
||||
MY_LEX_START, MY_LEX_CHAR, MY_LEX_IDENT,
|
||||
MY_LEX_IDENT_SEP, MY_LEX_IDENT_START,
|
||||
MY_LEX_REAL, MY_LEX_HEX_NUMBER, MY_LEX_BIN_NUMBER,
|
||||
MY_LEX_CMP_OP, MY_LEX_LONG_CMP_OP, MY_LEX_STRING, MY_LEX_COMMENT, MY_LEX_END,
|
||||
MY_LEX_OPERATOR_OR_IDENT, MY_LEX_NUMBER_IDENT, MY_LEX_INT_OR_REAL,
|
||||
MY_LEX_REAL_OR_POINT, MY_LEX_BOOL, MY_LEX_EOL, MY_LEX_ESCAPE,
|
||||
MY_LEX_LONG_COMMENT, MY_LEX_END_LONG_COMMENT, MY_LEX_SEMICOLON,
|
||||
MY_LEX_SET_VAR, MY_LEX_USER_END, MY_LEX_HOSTNAME, MY_LEX_SKIP,
|
||||
MY_LEX_USER_VARIABLE_DELIMITER, MY_LEX_SYSTEM_VAR,
|
||||
MY_LEX_IDENT_OR_KEYWORD,
|
||||
MY_LEX_IDENT_OR_HEX, MY_LEX_IDENT_OR_BIN, MY_LEX_IDENT_OR_NCHAR,
|
||||
MY_LEX_STRING_OR_DELIMITER
|
||||
};
|
||||
|
||||
struct charset_info_st;
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt for information about this structure */
|
||||
typedef struct my_collation_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Collation routines */
|
||||
int (*strnncoll)(struct charset_info_st *,
|
||||
const uchar *, size_t, const uchar *, size_t, my_bool);
|
||||
int (*strnncollsp)(struct charset_info_st *,
|
||||
const uchar *, size_t, const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
size_t (*strnxfrm)(struct charset_info_st *,
|
||||
uchar *, size_t, const uchar *, size_t);
|
||||
size_t (*strnxfrmlen)(struct charset_info_st *, size_t);
|
||||
my_bool (*like_range)(struct charset_info_st *,
|
||||
const char *s, size_t s_length,
|
||||
pchar w_prefix, pchar w_one, pchar w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_len, size_t *max_len);
|
||||
int (*wildcmp)(struct charset_info_st *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape,int w_one, int w_many);
|
||||
|
||||
int (*strcasecmp)(struct charset_info_st *, const char *, const char *);
|
||||
|
||||
uint (*instr)(struct charset_info_st *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
/* Hash calculation */
|
||||
void (*hash_sort)(struct charset_info_st *cs, const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2);
|
||||
my_bool (*propagate)(struct charset_info_st *cs, const uchar *str, size_t len);
|
||||
} MY_COLLATION_HANDLER;
|
||||
|
||||
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
||||
|
||||
/* Some typedef to make it easy for C++ to make function pointers */
|
||||
typedef int (*my_charset_conv_mb_wc)(struct charset_info_st *, my_wc_t *,
|
||||
const uchar *, const uchar *);
|
||||
typedef int (*my_charset_conv_wc_mb)(struct charset_info_st *, my_wc_t,
|
||||
uchar *, uchar *);
|
||||
typedef size_t (*my_charset_conv_case)(struct charset_info_st *,
|
||||
char *, size_t, char *, size_t);
|
||||
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct my_charset_handler_st
|
||||
{
|
||||
my_bool (*init)(struct charset_info_st *, void *(*alloc)(size_t));
|
||||
/* Multibyte routines */
|
||||
uint (*ismbchar)(struct charset_info_st *, const char *, const char *);
|
||||
uint (*mbcharlen)(struct charset_info_st *, uint c);
|
||||
size_t (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
size_t (*charpos)(struct charset_info_st *, const char *b, const char *e,
|
||||
size_t pos);
|
||||
size_t (*well_formed_len)(struct charset_info_st *,
|
||||
const char *b,const char *e,
|
||||
size_t nchars, int *error);
|
||||
size_t (*lengthsp)(struct charset_info_st *, const char *ptr, size_t length);
|
||||
size_t (*numcells)(struct charset_info_st *, const char *b, const char *e);
|
||||
|
||||
/* Unicode conversion */
|
||||
my_charset_conv_mb_wc mb_wc;
|
||||
my_charset_conv_wc_mb wc_mb;
|
||||
|
||||
/* CTYPE scanner */
|
||||
int (*ctype)(struct charset_info_st *cs, int *ctype,
|
||||
const uchar *s, const uchar *e);
|
||||
|
||||
/* Functions for case and sort conversion */
|
||||
size_t (*caseup_str)(struct charset_info_st *, char *);
|
||||
size_t (*casedn_str)(struct charset_info_st *, char *);
|
||||
|
||||
my_charset_conv_case caseup;
|
||||
my_charset_conv_case casedn;
|
||||
|
||||
/* Charset dependant snprintf() */
|
||||
size_t (*snprintf)(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt,
|
||||
...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5);
|
||||
size_t (*long10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
int radix, long int val);
|
||||
size_t (*longlong10_to_str)(struct charset_info_st *, char *to, size_t n,
|
||||
int radix, longlong val);
|
||||
|
||||
void (*fill)(struct charset_info_st *, char *to, size_t len, int fill);
|
||||
|
||||
/* String-to-number conversion routines */
|
||||
long (*strntol)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulong (*strntoul)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
longlong (*strntoll)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
ulonglong (*strntoull)(struct charset_info_st *, const char *s, size_t l,
|
||||
int base, char **e, int *err);
|
||||
double (*strntod)(struct charset_info_st *, char *s, size_t l, char **e,
|
||||
int *err);
|
||||
longlong (*strtoll10)(struct charset_info_st *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
ulonglong (*strntoull10rnd)(struct charset_info_st *cs,
|
||||
const char *str, size_t length,
|
||||
int unsigned_fl,
|
||||
char **endptr, int *error);
|
||||
size_t (*scan)(struct charset_info_st *, const char *b, const char *e,
|
||||
int sq);
|
||||
} MY_CHARSET_HANDLER;
|
||||
|
||||
extern MY_CHARSET_HANDLER my_charset_8bit_handler;
|
||||
extern MY_CHARSET_HANDLER my_charset_ucs2_handler;
|
||||
|
||||
|
||||
/*
|
||||
We define this CHARSET_INFO_DEFINED here to prevent a repeat of the
|
||||
typedef in hash.c, which will cause a compiler error.
|
||||
*/
|
||||
#define CHARSET_INFO_DEFINED
|
||||
|
||||
/* See strings/CHARSET_INFO.txt about information on this structure */
|
||||
typedef struct charset_info_st
|
||||
{
|
||||
uint number;
|
||||
uint primary_number;
|
||||
uint binary_number;
|
||||
uint state;
|
||||
const char *csname;
|
||||
const char *name;
|
||||
const char *comment;
|
||||
const char *tailoring;
|
||||
uchar *ctype;
|
||||
uchar *to_lower;
|
||||
uchar *to_upper;
|
||||
uchar *sort_order;
|
||||
uint16 *contractions;
|
||||
uint16 **sort_order_big;
|
||||
uint16 *tab_to_uni;
|
||||
MY_UNI_IDX *tab_from_uni;
|
||||
MY_UNICASE_INFO **caseinfo;
|
||||
uchar *state_map;
|
||||
uchar *ident_map;
|
||||
uint strxfrm_multiply;
|
||||
uchar caseup_multiply;
|
||||
uchar casedn_multiply;
|
||||
uint mbminlen;
|
||||
uint mbmaxlen;
|
||||
uint16 min_sort_char;
|
||||
uint16 max_sort_char; /* For LIKE optimization */
|
||||
uchar pad_char;
|
||||
my_bool escape_with_backslash_is_dangerous;
|
||||
|
||||
MY_CHARSET_HANDLER *cset;
|
||||
MY_COLLATION_HANDLER *coll;
|
||||
|
||||
} CHARSET_INFO;
|
||||
#define ILLEGAL_CHARSET_INFO_NUMBER (~0U)
|
||||
|
||||
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_bin;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_latin1;
|
||||
extern MYSQL_PLUGIN_IMPORT CHARSET_INFO my_charset_filename;
|
||||
|
||||
extern CHARSET_INFO my_charset_big5_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_big5_bin;
|
||||
extern CHARSET_INFO my_charset_cp932_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_cp932_bin;
|
||||
extern CHARSET_INFO my_charset_cp1250_czech_ci;
|
||||
extern CHARSET_INFO my_charset_eucjpms_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_eucjpms_bin;
|
||||
extern CHARSET_INFO my_charset_euckr_korean_ci;
|
||||
extern CHARSET_INFO my_charset_euckr_bin;
|
||||
extern CHARSET_INFO my_charset_gb2312_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_gb2312_bin;
|
||||
extern CHARSET_INFO my_charset_gbk_chinese_ci;
|
||||
extern CHARSET_INFO my_charset_gbk_bin;
|
||||
extern CHARSET_INFO my_charset_latin1_german2_ci;
|
||||
extern CHARSET_INFO my_charset_latin1_bin;
|
||||
extern CHARSET_INFO my_charset_latin2_czech_ci;
|
||||
extern CHARSET_INFO my_charset_sjis_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_sjis_bin;
|
||||
extern CHARSET_INFO my_charset_tis620_thai_ci;
|
||||
extern CHARSET_INFO my_charset_tis620_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_general_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_ujis_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_ujis_bin;
|
||||
extern CHARSET_INFO my_charset_utf16_bin;
|
||||
extern CHARSET_INFO my_charset_utf16_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf16_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_utf32_bin;
|
||||
extern CHARSET_INFO my_charset_utf32_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf32_unicode_ci;
|
||||
|
||||
extern CHARSET_INFO my_charset_utf8_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_unicode_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_bin;
|
||||
extern CHARSET_INFO my_charset_utf8mb4_bin;
|
||||
extern CHARSET_INFO my_charset_utf8mb4_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf8mb4_unicode_ci;
|
||||
#define MY_UTF8MB3 "utf8"
|
||||
#define MY_UTF8MB4 "utf8mb4"
|
||||
|
||||
|
||||
/* Helper functions to handle contraction */
|
||||
static inline my_bool
|
||||
my_cs_have_contractions(CHARSET_INFO *cs)
|
||||
{
|
||||
return cs->contractions != NULL;
|
||||
}
|
||||
|
||||
static inline my_bool
|
||||
my_cs_can_be_contraction_head(CHARSET_INFO *cs, my_wc_t wc)
|
||||
{
|
||||
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||
}
|
||||
|
||||
static inline my_bool
|
||||
my_cs_can_be_contraction_tail(CHARSET_INFO *cs, my_wc_t wc)
|
||||
{
|
||||
return ((const char *)cs->contractions)[0x40*0x40 + (wc & 0xFF)];
|
||||
}
|
||||
|
||||
static inline uint16*
|
||||
my_cs_contraction2_weight(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2)
|
||||
{
|
||||
return &cs->contractions[(wc1 - 0x40) * 0x40 + wc2 - 0x40];
|
||||
}
|
||||
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern size_t my_strnxfrm_simple(CHARSET_INFO *, uchar *, size_t,
|
||||
const uchar *, size_t);
|
||||
size_t my_strnxfrmlen_simple(CHARSET_INFO *, size_t);
|
||||
extern int my_strnncoll_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t, my_bool);
|
||||
|
||||
extern int my_strnncollsp_simple(CHARSET_INFO *, const uchar *, size_t,
|
||||
const uchar *, size_t,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
|
||||
extern void my_hash_sort_simple(CHARSET_INFO *cs,
|
||||
const uchar *key, size_t len,
|
||||
ulong *nr1, ulong *nr2);
|
||||
|
||||
extern size_t my_lengthsp_8bit(CHARSET_INFO *cs, const char *ptr, size_t length);
|
||||
|
||||
extern uint my_instr_simple(struct charset_info_st *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
|
||||
/* Functions for 8bit */
|
||||
extern size_t my_caseup_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_8bit(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_8bit(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
|
||||
extern int my_strcasecmp_8bit(CHARSET_INFO * cs, const char *, const char *);
|
||||
|
||||
int my_mb_wc_8bit(CHARSET_INFO *cs,my_wc_t *wc, const uchar *s,const uchar *e);
|
||||
int my_wc_mb_8bit(CHARSET_INFO *cs,my_wc_t wc, uchar *s, uchar *e);
|
||||
|
||||
int my_mb_ctype_8bit(CHARSET_INFO *,int *, const uchar *,const uchar *);
|
||||
int my_mb_ctype_mb(CHARSET_INFO *,int *, const uchar *,const uchar *);
|
||||
|
||||
size_t my_scan_8bit(CHARSET_INFO *cs, const char *b, const char *e, int sq);
|
||||
|
||||
size_t my_snprintf_8bit(struct charset_info_st *, char *to, size_t n,
|
||||
const char *fmt, ...)
|
||||
ATTRIBUTE_FORMAT(printf, 4, 5);
|
||||
|
||||
long my_strntol_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
ulong my_strntoul_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
longlong my_strntoll_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
ulonglong my_strntoull_8bit(CHARSET_INFO *, const char *s, size_t l, int base,
|
||||
char **e, int *err);
|
||||
double my_strntod_8bit(CHARSET_INFO *, char *s, size_t l,char **e,
|
||||
int *err);
|
||||
size_t my_long10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
long int val);
|
||||
size_t my_longlong10_to_str_8bit(CHARSET_INFO *, char *to, size_t l, int radix,
|
||||
longlong val);
|
||||
|
||||
longlong my_strtoll10_8bit(CHARSET_INFO *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
longlong my_strtoll10_ucs2(CHARSET_INFO *cs,
|
||||
const char *nptr, char **endptr, int *error);
|
||||
|
||||
ulonglong my_strntoull10rnd_8bit(CHARSET_INFO *cs,
|
||||
const char *str, size_t length, int
|
||||
unsigned_fl, char **endptr, int *error);
|
||||
ulonglong my_strntoull10rnd_ucs2(CHARSET_INFO *cs,
|
||||
const char *str, size_t length,
|
||||
int unsigned_fl, char **endptr, int *error);
|
||||
|
||||
void my_fill_8bit(CHARSET_INFO *cs, char* to, size_t l, int fill);
|
||||
|
||||
/* For 8-bit character set */
|
||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
/* For ASCII-based multi-byte character sets with mbminlen=1 */
|
||||
my_bool my_like_range_mb(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
/* For other character sets, with arbitrary mbminlen and mbmaxlen numbers */
|
||||
my_bool my_like_range_generic(CHARSET_INFO *cs,
|
||||
const char *ptr, size_t ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
size_t res_length,
|
||||
char *min_str, char *max_str,
|
||||
size_t *min_length, size_t *max_length);
|
||||
|
||||
int my_wildcmp_8bit(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
int my_wildcmp_bin(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
size_t my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
|
||||
|
||||
/* Functions for multibyte charsets */
|
||||
extern size_t my_caseup_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_casedn_str_mb(CHARSET_INFO *, char *);
|
||||
extern size_t my_caseup_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_mb(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_caseup_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_mb_varlen(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_caseup_ujis(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern size_t my_casedn_ujis(CHARSET_INFO *, char *src, size_t srclen,
|
||||
char *dst, size_t dstlen);
|
||||
extern int my_strcasecmp_mb(CHARSET_INFO * cs,const char *, const char *);
|
||||
|
||||
int my_wildcmp_mb(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
size_t my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_numcells_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
size_t my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, size_t pos);
|
||||
size_t my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e,
|
||||
size_t pos, int *error);
|
||||
uint my_instr_mb(struct charset_info_st *,
|
||||
const char *b, size_t b_length,
|
||||
const char *s, size_t s_length,
|
||||
my_match_t *match, uint nmatch);
|
||||
|
||||
int my_strnncoll_mb_bin(CHARSET_INFO * cs,
|
||||
const uchar *s, size_t slen,
|
||||
const uchar *t, size_t tlen,
|
||||
my_bool t_is_prefix);
|
||||
|
||||
int my_strnncollsp_mb_bin(CHARSET_INFO *cs,
|
||||
const uchar *a, size_t a_length,
|
||||
const uchar *b, size_t b_length,
|
||||
my_bool diff_if_only_endspace_difference);
|
||||
|
||||
int my_wildcmp_mb_bin(CHARSET_INFO *cs,
|
||||
const char *str,const char *str_end,
|
||||
const char *wildstr,const char *wildend,
|
||||
int escape, int w_one, int w_many);
|
||||
|
||||
int my_strcasecmp_mb_bin(CHARSET_INFO * cs __attribute__((unused)),
|
||||
const char *s, const char *t);
|
||||
|
||||
void my_hash_sort_mb_bin(CHARSET_INFO *cs __attribute__((unused)),
|
||||
const uchar *key, size_t len,ulong *nr1, ulong *nr2);
|
||||
|
||||
size_t my_strnxfrm_unicode(CHARSET_INFO *,
|
||||
uchar *dst, size_t dstlen,
|
||||
const uchar *src, size_t srclen);
|
||||
|
||||
size_t my_strnxfrm_unicode_full_bin(CHARSET_INFO *,
|
||||
uchar *dst, size_t dstlen,
|
||||
const uchar *src, size_t srclen);
|
||||
size_t my_strnxfrmlen_unicode_full_bin(CHARSET_INFO *, size_t);
|
||||
|
||||
int my_wildcmp_unicode(CHARSET_INFO *cs,
|
||||
const char *str, const char *str_end,
|
||||
const char *wildstr, const char *wildend,
|
||||
int escape, int w_one, int w_many,
|
||||
MY_UNICASE_INFO **weights);
|
||||
|
||||
extern my_bool my_parse_charset_xml(const char *bug, size_t len,
|
||||
int (*add)(CHARSET_INFO *cs));
|
||||
extern char *my_strchr(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
pchar c);
|
||||
extern size_t my_strcspn(CHARSET_INFO *cs, const char *str, const char *end,
|
||||
const char *accept);
|
||||
|
||||
my_bool my_propagate_simple(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
my_bool my_propagate_complex(CHARSET_INFO *cs, const uchar *str, size_t len);
|
||||
|
||||
|
||||
uint my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong len);
|
||||
my_bool my_charset_is_ascii_based(CHARSET_INFO *cs);
|
||||
my_bool my_charset_is_8bit_pure_ascii(CHARSET_INFO *cs);
|
||||
uint my_charset_repertoire(CHARSET_INFO *cs);
|
||||
|
||||
my_bool my_charset_is_ascii_compatible(CHARSET_INFO *cs);
|
||||
|
||||
extern size_t my_vsnprintf_ex(CHARSET_INFO *cs, char *to, size_t n,
|
||||
const char* fmt, va_list ap);
|
||||
|
||||
#define _MY_U 01 /* Upper case */
|
||||
#define _MY_L 02 /* Lower case */
|
||||
#define _MY_NMR 04 /* Numeral (digit) */
|
||||
#define _MY_SPC 010 /* Spacing character */
|
||||
#define _MY_PNT 020 /* Punctuation */
|
||||
#define _MY_CTR 040 /* Control character */
|
||||
#define _MY_B 0100 /* Blank */
|
||||
#define _MY_X 0200 /* heXadecimal digit */
|
||||
|
||||
|
||||
#define my_isascii(c) (!((c) & ~0177))
|
||||
#define my_toascii(c) ((c) & 0177)
|
||||
#define my_tocntrl(c) ((c) & 31)
|
||||
#define my_toprint(c) ((c) | 64)
|
||||
#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
|
||||
#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
|
||||
#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
|
||||
#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
|
||||
#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
|
||||
#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
|
||||
#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
|
||||
#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
|
||||
#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
|
||||
#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
|
||||
#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
|
||||
#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
|
||||
#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
|
||||
|
||||
/* Some macros that should be cleaned up a little */
|
||||
#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
|
||||
#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
|
||||
|
||||
#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
|
||||
#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
|
||||
#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
|
||||
#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d), 0))
|
||||
#define my_like_range(s, a, b, c, d, e, f, g, h, i, j) \
|
||||
((s)->coll->like_range((s), (a), (b), (c), (d), (e), (f), (g), (h), (i), (j)))
|
||||
#define my_wildcmp(cs,s,se,w,we,e,o,m) ((cs)->coll->wildcmp((cs),(s),(se),(w),(we),(e),(o),(m)))
|
||||
#define my_strcasecmp(s, a, b) ((s)->coll->strcasecmp((s), (a), (b)))
|
||||
#define my_charpos(cs, b, e, num) (cs)->cset->charpos((cs), (const char*) (b), (const char *)(e), (num))
|
||||
|
||||
|
||||
#define use_mb(s) ((s)->cset->ismbchar != NULL)
|
||||
#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
|
||||
#ifdef USE_MB
|
||||
#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
|
||||
#else
|
||||
#define my_mbcharlen(s, a) 1
|
||||
#endif
|
||||
|
||||
#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
|
||||
#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))
|
||||
#define my_strntol(s, a, b, c, d, e) ((s)->cset->strntol((s),(a),(b),(c),(d),(e)))
|
||||
#define my_strntoul(s, a, b, c, d, e) ((s)->cset->strntoul((s),(a),(b),(c),(d),(e)))
|
||||
#define my_strntoll(s, a, b, c, d, e) ((s)->cset->strntoll((s),(a),(b),(c),(d),(e)))
|
||||
#define my_strntoull(s, a, b, c,d, e) ((s)->cset->strntoull((s),(a),(b),(c),(d),(e)))
|
||||
#define my_strntod(s, a, b, c, d) ((s)->cset->strntod((s),(a),(b),(c),(d)))
|
||||
|
||||
|
||||
/* XXX: still need to take care of this one */
|
||||
#ifdef MY_CHARSET_TIS620
|
||||
#error The TIS620 charset is broken at the moment. Tell tim to fix it.
|
||||
#define USE_TIS620
|
||||
#include "t_ctype.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _m_ctype_h */
|
||||
295
deps/mysqllite/include/m_string.h
vendored
295
deps/mysqllite/include/m_string.h
vendored
@@ -1,295 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* There may be prolems include all of theese. Try to test in
|
||||
configure with ones are needed? */
|
||||
|
||||
/* This is needed for the definitions of strchr... on solaris */
|
||||
|
||||
#ifndef _m_string_h
|
||||
#define _m_string_h
|
||||
|
||||
#include "my_global.h" /* HAVE_* */
|
||||
|
||||
#ifndef __USE_GNU
|
||||
#define __USE_GNU /* We want to use stpcpy */
|
||||
#endif
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
#if defined(HAVE_STRING_H)
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/* need by my_vsnprintf */
|
||||
#include <stdarg.h>
|
||||
|
||||
/* This is needed for the definitions of bzero... on solaris */
|
||||
#if defined(HAVE_STRINGS_H)
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
/* This is needed for the definitions of memcpy... on solaris */
|
||||
#if defined(HAVE_MEMORY_H) && !defined(__cplusplus)
|
||||
#include <memory.h>
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_MEMCPY) && !defined(HAVE_MEMMOVE)
|
||||
# define memcpy(d, s, n) bcopy ((s), (d), (n))
|
||||
# define memset(A,C,B) bfill((A),(B),(C))
|
||||
# define memmove(d, s, n) bmove ((d), (s), (n))
|
||||
#elif defined(HAVE_MEMMOVE)
|
||||
# define bmove(d, s, n) memmove((d), (s), (n))
|
||||
#endif
|
||||
|
||||
/* Unixware 7 */
|
||||
#if !defined(HAVE_BFILL)
|
||||
# define bfill(A,B,C) memset((A),(C),(B))
|
||||
#endif
|
||||
|
||||
#if !defined(bzero) && !defined(HAVE_BZERO)
|
||||
# define bzero(A,B) memset((A),0,(B))
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
my_str_malloc() and my_str_free() are assigned to implementations in
|
||||
strings/alloc.c, but can be overridden in the calling program.
|
||||
*/
|
||||
extern void *(*my_str_malloc)(size_t);
|
||||
extern void (*my_str_free)(void *);
|
||||
|
||||
#if defined(HAVE_STPCPY) && MY_GNUC_PREREQ(3, 4) && !defined(__INTEL_COMPILER)
|
||||
#define strmov(A,B) __builtin_stpcpy((A),(B))
|
||||
#elif defined(HAVE_STPCPY)
|
||||
#define strmov(A,B) stpcpy((A),(B))
|
||||
#ifndef stpcpy
|
||||
extern char *stpcpy(char *, const char *); /* For AIX with gcc 2.95.3 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Declared in int2str() */
|
||||
extern char _dig_vec_upper[];
|
||||
extern char _dig_vec_lower[];
|
||||
|
||||
#ifndef strmov
|
||||
#define strmov_overlapp(A,B) strmov(A,B)
|
||||
#define strmake_overlapp(A,B,C) strmake(A,B,C)
|
||||
#endif
|
||||
|
||||
/* Prototypes for string functions */
|
||||
|
||||
extern void bmove_upp(uchar *dst,const uchar *src,size_t len);
|
||||
extern void bchange(uchar *dst,size_t old_len,const uchar *src,
|
||||
size_t new_len,size_t tot_len);
|
||||
extern void strappend(char *s,size_t len,pchar fill);
|
||||
extern char *strend(const char *s);
|
||||
extern char *strcend(const char *, pchar);
|
||||
extern char *strfill(char * s,size_t len,pchar fill);
|
||||
extern char *strmake(char *dst,const char *src,size_t length);
|
||||
|
||||
#ifndef strmov
|
||||
extern char *strmov(char *dst,const char *src);
|
||||
#else
|
||||
extern char *strmov_overlapp(char *dst,const char *src);
|
||||
#endif
|
||||
extern char *strnmov(char *dst, const char *src, size_t n);
|
||||
extern char *strcont(const char *src, const char *set);
|
||||
extern char *strxmov(char *dst, const char *src, ...);
|
||||
extern char *strxnmov(char *dst, size_t len, const char *src, ...);
|
||||
|
||||
/* Prototypes of normal stringfunctions (with may ours) */
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern size_t strnlen(const char *s, size_t n);
|
||||
#endif
|
||||
|
||||
extern int is_prefix(const char *, const char *);
|
||||
|
||||
/* Conversion routines */
|
||||
typedef enum {
|
||||
MY_GCVT_ARG_FLOAT,
|
||||
MY_GCVT_ARG_DOUBLE
|
||||
} my_gcvt_arg_type;
|
||||
|
||||
double my_strtod(const char *str, char **end, int *error);
|
||||
double my_atof(const char *nptr);
|
||||
size_t my_fcvt(double x, int precision, char *to, my_bool *error);
|
||||
size_t my_gcvt(double x, my_gcvt_arg_type type, int width, char *to,
|
||||
my_bool *error);
|
||||
|
||||
#define NOT_FIXED_DEC 31
|
||||
|
||||
/*
|
||||
The longest string my_fcvt can return is 311 + "precision" bytes.
|
||||
Here we assume that we never cal my_fcvt() with precision >= NOT_FIXED_DEC
|
||||
(+ 1 byte for the terminating '\0').
|
||||
*/
|
||||
#define FLOATING_POINT_BUFFER (311 + NOT_FIXED_DEC)
|
||||
|
||||
/*
|
||||
We want to use the 'e' format in some cases even if we have enough space
|
||||
for the 'f' one just to mimic sprintf("%.15g") behavior for large integers,
|
||||
and to improve it for numbers < 10^(-4).
|
||||
That is, for |x| < 1 we require |x| >= 10^(-15), and for |x| > 1 we require
|
||||
it to be integer and be <= 10^DBL_DIG for the 'f' format to be used.
|
||||
We don't lose precision, but make cases like "1e200" or "0.00001" look nicer.
|
||||
*/
|
||||
#define MAX_DECPT_FOR_F_FORMAT DBL_DIG
|
||||
|
||||
/*
|
||||
The maximum possible field width for my_gcvt() conversion.
|
||||
(DBL_DIG + 2) significant digits + sign + "." + ("e-NNN" or
|
||||
MAX_DECPT_FOR_F_FORMAT zeros for cases when |x|<1 and the 'f' format is used).
|
||||
*/
|
||||
#define MY_GCVT_MAX_FIELD_WIDTH (DBL_DIG + 4 + max(5, MAX_DECPT_FOR_F_FORMAT)) \
|
||||
|
||||
extern char *llstr(longlong value,char *buff);
|
||||
extern char *ullstr(longlong value,char *buff);
|
||||
#ifndef HAVE_STRTOUL
|
||||
extern long strtol(const char *str, char **ptr, int base);
|
||||
extern ulong strtoul(const char *str, char **ptr, int base);
|
||||
#endif
|
||||
|
||||
extern char *int2str(long val, char *dst, int radix, int upcase);
|
||||
extern char *int10_to_str(long val,char *dst,int radix);
|
||||
extern char *str2int(const char *src,int radix,long lower,long upper,
|
||||
long *val);
|
||||
longlong my_strtoll10(const char *nptr, char **endptr, int *error);
|
||||
#if SIZEOF_LONG == SIZEOF_LONG_LONG
|
||||
#define ll2str(A,B,C,D) int2str((A),(B),(C),(D))
|
||||
#define longlong10_to_str(A,B,C) int10_to_str((A),(B),(C))
|
||||
#undef strtoll
|
||||
#define strtoll(A,B,C) strtol((A),(B),(C))
|
||||
#define strtoull(A,B,C) strtoul((A),(B),(C))
|
||||
#ifndef HAVE_STRTOULL
|
||||
#define HAVE_STRTOULL
|
||||
#endif
|
||||
#ifndef HAVE_STRTOLL
|
||||
#define HAVE_STRTOLL
|
||||
#endif
|
||||
#else
|
||||
#ifdef HAVE_LONG_LONG
|
||||
extern char *ll2str(longlong val,char *dst,int radix, int upcase);
|
||||
extern char *longlong10_to_str(longlong val,char *dst,int radix);
|
||||
#if (!defined(HAVE_STRTOULL) || defined(NO_STRTOLL_PROTO))
|
||||
extern longlong strtoll(const char *str, char **ptr, int base);
|
||||
extern ulonglong strtoull(const char *str, char **ptr, int base);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#define longlong2str(A,B,C) ll2str((A),(B),(C),1)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
LEX_STRING -- a pair of a C-string and its length.
|
||||
(it's part of the plugin API as a MYSQL_LEX_STRING)
|
||||
*/
|
||||
|
||||
#include <mysql/plugin.h>
|
||||
typedef struct st_mysql_lex_string LEX_STRING;
|
||||
|
||||
#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1))
|
||||
#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1))
|
||||
#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1))
|
||||
|
||||
struct st_mysql_const_lex_string
|
||||
{
|
||||
const char *str;
|
||||
size_t length;
|
||||
};
|
||||
typedef struct st_mysql_const_lex_string LEX_CSTRING;
|
||||
|
||||
/* SPACE_INT is a word that contains only spaces */
|
||||
#if SIZEOF_INT == 4
|
||||
#define SPACE_INT 0x20202020
|
||||
#elif SIZEOF_INT == 8
|
||||
#define SPACE_INT 0x2020202020202020
|
||||
#else
|
||||
#error define the appropriate constant for a word full of spaces
|
||||
#endif
|
||||
|
||||
/**
|
||||
Skip trailing space.
|
||||
|
||||
On most systems reading memory in larger chunks (ideally equal to the size of
|
||||
the chinks that the machine physically reads from memory) causes fewer memory
|
||||
access loops and hence increased performance.
|
||||
This is why the 'int' type is used : it's closest to that (according to how
|
||||
it's defined in C).
|
||||
So when we determine the amount of whitespace at the end of a string we do
|
||||
the following :
|
||||
1. We divide the string into 3 zones :
|
||||
a) from the start of the string (__start) to the first multiple
|
||||
of sizeof(int) (__start_words)
|
||||
b) from the end of the string (__end) to the last multiple of sizeof(int)
|
||||
(__end_words)
|
||||
c) a zone that is aligned to sizeof(int) and can be safely accessed
|
||||
through an int *
|
||||
2. We start comparing backwards from (c) char-by-char. If all we find is
|
||||
space then we continue
|
||||
3. If there are elements in zone (b) we compare them as unsigned ints to a
|
||||
int mask (SPACE_INT) consisting of all spaces
|
||||
4. Finally we compare the remaining part (a) of the string char by char.
|
||||
This covers for the last non-space unsigned int from 3. (if any)
|
||||
|
||||
This algorithm works well for relatively larger strings, but it will slow
|
||||
the things down for smaller strings (because of the additional calculations
|
||||
and checks compared to the naive method). Thus the barrier of length 20
|
||||
is added.
|
||||
|
||||
@param ptr pointer to the input string
|
||||
@param len the length of the string
|
||||
@return the last non-space character
|
||||
*/
|
||||
|
||||
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len)
|
||||
{
|
||||
const uchar *end= ptr + len;
|
||||
|
||||
if (len > 20)
|
||||
{
|
||||
const uchar *end_words= (const uchar *)(intptr)
|
||||
(((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT);
|
||||
const uchar *start_words= (const uchar *)(intptr)
|
||||
((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT);
|
||||
|
||||
DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT);
|
||||
if (end_words > ptr)
|
||||
{
|
||||
while (end > end_words && end[-1] == 0x20)
|
||||
end--;
|
||||
if (end[-1] == 0x20 && start_words < end_words)
|
||||
while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT)
|
||||
end -= SIZEOF_INT;
|
||||
}
|
||||
}
|
||||
while (end > ptr && end[-1] == 0x20)
|
||||
end--;
|
||||
return (end);
|
||||
}
|
||||
|
||||
static inline void lex_string_set(LEX_STRING *lex_str, const char *c_str)
|
||||
{
|
||||
lex_str->str= (char *) c_str;
|
||||
lex_str->length= strlen(c_str);
|
||||
}
|
||||
|
||||
#endif
|
||||
60
deps/mysqllite/include/my_alloc.h
vendored
60
deps/mysqllite/include/my_alloc.h
vendored
@@ -1,60 +0,0 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Data structures for mysys/my_alloc.c (root memory allocator)
|
||||
*/
|
||||
|
||||
#ifndef _my_alloc_h
|
||||
#define _my_alloc_h
|
||||
|
||||
#define ALLOC_MAX_BLOCK_TO_DROP 4096
|
||||
#define ALLOC_MAX_BLOCK_USAGE_BEFORE_DROP 10
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct st_used_mem
|
||||
{ /* struct for once_alloc (block) */
|
||||
struct st_used_mem *next; /* Next block in use */
|
||||
unsigned int left; /* memory left in block */
|
||||
unsigned int size; /* size of block */
|
||||
} USED_MEM;
|
||||
|
||||
|
||||
typedef struct st_mem_root
|
||||
{
|
||||
USED_MEM *free; /* blocks with free memory in it */
|
||||
USED_MEM *used; /* blocks almost without free memory */
|
||||
USED_MEM *pre_alloc; /* preallocated block */
|
||||
/* if block have less memory it will be put in 'used' list */
|
||||
size_t min_malloc;
|
||||
size_t block_size; /* initial block size */
|
||||
unsigned int block_num; /* allocated blocks counter */
|
||||
/*
|
||||
first free block in queue test counter (if it exceed
|
||||
MAX_BLOCK_USAGE_BEFORE_DROP block will be dropped in 'used' list)
|
||||
*/
|
||||
unsigned int first_block_usage;
|
||||
|
||||
void (*error_handler)(void);
|
||||
} MEM_ROOT;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
69
deps/mysqllite/include/my_attribute.h
vendored
69
deps/mysqllite/include/my_attribute.h
vendored
@@ -1,69 +0,0 @@
|
||||
/* Copyright (C) 2000-2003 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/*
|
||||
Helper macros used for setting different __attributes__
|
||||
on functions in a portable fashion
|
||||
*/
|
||||
|
||||
#ifndef _my_attribute_h
|
||||
#define _my_attribute_h
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# ifndef GCC_VERSION
|
||||
# define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
Disable __attribute__() on gcc < 2.7, g++ < 3.4, and non-gcc compilers.
|
||||
Some forms of __attribute__ are actually supported in earlier versions of
|
||||
g++, but we just disable them all because we only use them to generate
|
||||
compilation warnings.
|
||||
*/
|
||||
#ifndef __attribute__
|
||||
# if !defined(__GNUC__)
|
||||
# define __attribute__(A)
|
||||
# elif GCC_VERSION < 2008
|
||||
# define __attribute__(A)
|
||||
# elif defined(__cplusplus) && GCC_VERSION < 3004
|
||||
# define __attribute__(A)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
__attribute__((format(...))) is only supported in gcc >= 2.8 and g++ >= 3.4
|
||||
But that's already covered by the __attribute__ tests above, so this is
|
||||
just a convenience macro.
|
||||
*/
|
||||
#ifndef ATTRIBUTE_FORMAT
|
||||
# define ATTRIBUTE_FORMAT(style, m, n) __attribute__((format(style, m, n)))
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
__attribute__((format(...))) on a function pointer is not supported
|
||||
until gcc 3.1
|
||||
*/
|
||||
#ifndef ATTRIBUTE_FORMAT_FPTR
|
||||
# if (GCC_VERSION >= 3001)
|
||||
# define ATTRIBUTE_FORMAT_FPTR(style, m, n) ATTRIBUTE_FORMAT(style, m, n)
|
||||
# else
|
||||
# define ATTRIBUTE_FORMAT_FPTR(style, m, n)
|
||||
# endif /* GNUC >= 3.1 */
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
145
deps/mysqllite/include/my_compiler.h
vendored
145
deps/mysqllite/include/my_compiler.h
vendored
@@ -1,145 +0,0 @@
|
||||
#ifndef MY_COMPILER_INCLUDED
|
||||
#define MY_COMPILER_INCLUDED
|
||||
|
||||
/* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||
|
||||
/**
|
||||
Header for compiler-dependent features.
|
||||
|
||||
Intended to contain a set of reusable wrappers for preprocessor
|
||||
macros, attributes, pragmas, and any other features that are
|
||||
specific to a target compiler.
|
||||
*/
|
||||
|
||||
#include <my_global.h> /* stddef.h offsetof */
|
||||
|
||||
/**
|
||||
Compiler-dependent internal convenience macros.
|
||||
*/
|
||||
|
||||
/* GNU C/C++ */
|
||||
#if defined __GNUC__
|
||||
/* Convenience macro to test the minimum required GCC version. */
|
||||
# define MY_GNUC_PREREQ(maj, min) \
|
||||
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
|
||||
/* Any after 2.95... */
|
||||
# define MY_ALIGN_EXT
|
||||
/* Comunicate to the compiler the unreachability of the code. */
|
||||
# if MY_GNUC_PREREQ(4,5)
|
||||
# define MY_ASSERT_UNREACHABLE() __builtin_unreachable()
|
||||
# endif
|
||||
|
||||
/* Microsoft Visual C++ */
|
||||
#elif defined _MSC_VER
|
||||
# define MY_ALIGNOF(type) __alignof(type)
|
||||
# define MY_ALIGNED(n) __declspec(align(n))
|
||||
|
||||
/* Oracle Solaris Studio */
|
||||
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
# if __SUNPRO_C >= 0x590
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
|
||||
/* IBM XL C/C++ */
|
||||
#elif defined __xlC__
|
||||
# if __xlC__ >= 0x0600
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
|
||||
/* HP aCC */
|
||||
#elif defined(__HP_aCC) || defined(__HP_cc)
|
||||
# if (__HP_aCC >= 60000) || (__HP_cc >= 60000)
|
||||
# define MY_ALIGN_EXT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MY_ALIGN_EXT
|
||||
/** Specifies the minimum alignment of a type. */
|
||||
# define MY_ALIGNOF(type) __alignof__(type)
|
||||
/** Determine the alignment requirement of a type. */
|
||||
# define MY_ALIGNED(n) __attribute__((__aligned__((n))))
|
||||
#endif
|
||||
|
||||
/**
|
||||
Generic (compiler-independent) features.
|
||||
*/
|
||||
|
||||
#ifndef MY_GNUC_PREREQ
|
||||
# define MY_GNUC_PREREQ(maj, min) (0)
|
||||
#endif
|
||||
|
||||
#ifndef MY_ALIGNOF
|
||||
# ifdef __cplusplus
|
||||
template<typename type> struct my_alignof_helper { char m1; type m2; };
|
||||
/* Invalid for non-POD types, but most compilers give the right answer. */
|
||||
# define MY_ALIGNOF(type) offsetof(my_alignof_helper<type>, m2)
|
||||
# else
|
||||
# define MY_ALIGNOF(type) offsetof(struct { char m1; type m2; }, m2)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MY_ASSERT_UNREACHABLE
|
||||
# define MY_ASSERT_UNREACHABLE() do { assert(0); } while (0)
|
||||
#endif
|
||||
|
||||
/**
|
||||
C++ Type Traits
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
/**
|
||||
Opaque storage with a particular alignment.
|
||||
*/
|
||||
# if defined(MY_ALIGNED)
|
||||
/* Partial specialization used due to MSVC++. */
|
||||
template<size_t alignment> struct my_alignment_imp;
|
||||
template<> struct MY_ALIGNED(1) my_alignment_imp<1> {};
|
||||
template<> struct MY_ALIGNED(2) my_alignment_imp<2> {};
|
||||
template<> struct MY_ALIGNED(4) my_alignment_imp<4> {};
|
||||
template<> struct MY_ALIGNED(8) my_alignment_imp<8> {};
|
||||
template<> struct MY_ALIGNED(16) my_alignment_imp<16> {};
|
||||
/* ... expand as necessary. */
|
||||
# else
|
||||
template<size_t alignment>
|
||||
struct my_alignment_imp { double m1; };
|
||||
# endif
|
||||
|
||||
/**
|
||||
A POD type with a given size and alignment.
|
||||
|
||||
@remark If the compiler does not support a alignment attribute
|
||||
(MY_ALIGN macro), the default alignment of a double is
|
||||
used instead.
|
||||
|
||||
@tparam size The minimum size.
|
||||
@tparam alignment The desired alignment: 1, 2, 4, 8 or 16.
|
||||
*/
|
||||
template <size_t size, size_t alignment>
|
||||
struct my_aligned_storage
|
||||
{
|
||||
union
|
||||
{
|
||||
char data[size];
|
||||
my_alignment_imp<alignment> align;
|
||||
};
|
||||
};
|
||||
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#include <my_attribute.h>
|
||||
|
||||
#endif /* MY_COMPILER_INCLUDED */
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user