How to solve this inconsistency timing of MySQL queries?


Table Details :-

SHOW CREATE TABLE foldertable

Result

CREATE TABLE `foldertable` (  `serverToken` bigint(1) NOT NULL,  `folderName` varchar(255) NOT NULL,  `folderid` varchar(255) NOT NULL,  `RootFolderPath` longtext NOT NULL,  `createdTime` datetime NOT NULL,  `LastEdited` datetime NOT NULL,  `RootFolderPreviewPath` longtext NOT NULL,  `userFolderPathName` text NOT NULL,  `starred` tinyint(1) NOT NULL,  `trashed` tinyint(1) NOT NULL,  PRIMARY KEY (`folderid`) USING BTREE,  UNIQUE KEY `folderid` (`folderid`),  KEY `serverToken` (`serverToken`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4  

Point to note-

I am always executing second query while first transaction is running . The sleep(10) is there intentionaly

Tests

First session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`(     `serverToken`,     `folderName`,     `folderid`,     `RootFolderPath`,     `createdTime`,     `LastEdited`,     `RootFolderPreviewPath`,     `userFolderPathName`,     `starred`,     `trashed` ) VALUES(     12345,     '',     'ABCDE',     '',     '',     '',     '',     '',     '',     '' );   

Result

1 row inserted. (Query took 9.4569 seconds.)

Second session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`(     `serverToken`,     `folderName`,     `folderid`,     `RootFolderPath`,     `createdTime`,     `LastEdited`,     `RootFolderPreviewPath`,     `userFolderPathName`,     `starred`,     `trashed` ) VALUES(     12345,     '',     'ABCDEf',     '',     '',     '',     '',     '',     '',     '' ); 

Result

1 row inserted. (Query took 9.4569 seconds.)

Third session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`(     `serverToken`,     `folderName`,     `folderid`,     `RootFolderPath`,     `createdTime`,     `LastEdited`,     `RootFolderPreviewPath`,     `userFolderPathName`,     `starred`,     `trashed` ) VALUES(     1234567,     '',     'ABCDEfg',     '',     '',     '',     '',     '',     '',     '' ); 

Result

1 row inserted. (Query took 9.4569 seconds.)

Forth session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`( `serverToken`, `folderName`, `folderid`, `RootFolderPath`, `createdTime`, `LastEdited`, `RootFolderPreviewPath`, `userFolderPathName`, `starred`, `trashed` ) VALUES( 123, '', 'ABCDEfgh', '', '', '', '', '', '', '' ) 

Result

1 row inserted. (Query took 0.0073 seconds.)

Fifth session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`( `serverToken`, `folderName`, `folderid`, `RootFolderPath`, `createdTime`, `LastEdited`, `RootFolderPreviewPath`, `userFolderPathName`, `starred`, `trashed` ) VALUES( 1235465, '', 'ABCEfgh', '', '', '', '', '', '', '' ) 

Result

1 row inserted. (Query took 9.5040 seconds.)

Fifth session

First Query :-

mysqli_begin_transaction($  conn);  $  sql = "SELECT * FROM foldertable where folderid  = '1234567' FOR  UPDATE" ; $  sql = "SELECT * FROM foldertable where serverToken  = 1234567 FOR  UPDATE" ; mysqli_query($  conn , $  sql) ; echo (mysqli_error($  conn)) ; echo(mysqli_affected_rows($  conn)) ; sleep (10); mysqli_commit($  conn) ;  

2nd Query

INSERT INTO `foldertable`(     `serverToken`,     `folderName`,     `folderid`,     `RootFolderPath`,     `createdTime`,     `LastEdited`,     `RootFolderPreviewPath`,     `userFolderPathName`,     `starred`,     `trashed` ) VALUES(     1235465,     '',     'ABCEfghi',     '',     '',     '',     '',     '',     '',     '' ); 

Result

1 row inserted. (Query took 0.0087 seconds.)

I am quite new to mysql . I am using xampp for Testing and phpmyadmin for query and postman for transaction api .

So How can I solve this strange behaviour .

How does the timing of Order Domain’s Voice of Authority work?

The Order Domain cleric from Tasha’s Cauldron of Everything has the Voice of Authority feature. Part of that feature states:

If you cast a spell with a spell slot of 1st level or higher and target an ally with the spell, that ally can use their reaction immediately after the spell to make one weapon attack against a creature of your choice that you can see.

Immediately after the spell _____ ? Is cast? Targets the ally? Affects the ally? Ends?

For spells like healing word, the intent seems simple. The spell is instantaneous, so:

  1. You cast healing word, targeting your ally.
  2. Your ally is healed.
  3. You use Voice of Authority. Your ally uses their reaction to make an attack.

For spells like dawn, things get a little more complicated. For simplicity, I’ll assume that all creatures within the area count as targets. It seems like the initial cast of a duration spell would work like this:

  1. You cast dawn, which includes one ally in the area.
  2. Your ally rolls their save and takes damage.
  3. You use Voice of Authority. Your ally uses their reaction to make an attack.

But if you maintain concentration, the spell continues:

  1. Your ally (the same one as above) takes their normal turn in initiative.
  2. Your ally ends their turn.
  3. Your ally is still within dawn, so they are targeted/affected (?) by the spell again.
  4. Your ally rolls their save and takes damage.
  5. (?) You use Voice of Authority. Your ally uses their reaction to make an attack.

Voice of Authority restricts you to only one ally affected, but (potentially?) doesn’t restrict that one ally to more than one attack.

For some additional weirdness, allies could be targeted/affected only on subsequent turns:

  1. You cast dawn, which includes no allies in the area.
  2. Your ally takes their normal turn in initiative, during which they enter the area.
  3. Your ally ends their turn in the area.
  4. Your ally is targeted/affected (?) by the spell for the first time.
  5. Your ally rolls their save and takes damage.
  6. (?) You now use Voice of Authority. Your ally uses their reaction to make an attack.

My question is: how does the timing of Order Domain’s Voice of Authority work, particularly for area spells with a duration? I expect to be using this class feature at a table that sticks closely to RAW, so it would be helpful to know what the rules say precisely. If the rules are unclear or undesirable, then tested rulings are also welcome.

Timing of Suggested actions and a target’s “best ability”

The first level enchantment spell Command specifies that the action the target is forced to take happens

on its next turn

The second level enchantment spell Suggestion, on the other hand, says that for the target,

On a failed save, it pursues the course of action you described to the best of its ability.

Since the action is not specified as starting on its next turn, it is possible that it could be started or even completed before its next turn, provided the action was one which it could take even while not on its turn. Furthermore,

the spell ends when the subject finishes what it was asked to do.

How should the GM, or possibly the GM playing as the target of the spell, interpret "to the best of its ability"? Is it better to act sooner, before its turn, or wait until its turn so as to have more options or more powerful options available in order to complete the suggested course of action?

As a specific example, suppose a target with Extra Attack was subject to the suggestion "attack the guard". The guard then leaves the reach of the target before the target’s turn. The target could choose to use its reaction to make a single attack, which would end the suggestion effect. The target could also choose to wait until its turn, allowing it to take the Attack Action, attack multiple times with Extra Attack, and possibly use other abilities such as bonus actions or movement to make its attacks more effective.

Of these two choices (less sooner or more later), which would be considered pursuing the course of the action to "the best of its ability"?

This question is related, and asks (in part) whether the target will perform actions before its first turn. However, my question is different in that asks about the resolution of the "to the best of its ability" clause by supposing a tradeoff between acting sooner for less effect or later for more effect.

What is the timing of a Rod of Absorption’s spell-absorbing reaction?

Suppose I have a Rod of Absorption, which has this ability:

While holding this rod, you can use your reaction to absorb a spell that is targeting only you and not with an area of effect. The absorbed spell’s effect is canceled, and the spell’s energy — not the spell itself — is stored in the rod. The energy has the same level as the spell when it was cast. The rod can absorb and store up to 50 levels of energy over the course of its existence. Once the rod absorbs 50 levels of energy, it can’t absorb more. If you are targeted by a spell that the rod can’t store, the rod has no effect on that spell.

If an enemy is casting a spell at me, when do I decide whether to use my reaction to absorb it, and how much information do I have about the spell being cast at me at the time I make that decision? For example, the enemy who is "casting a spell at me" might be targeting me with the area of effect of a Fireball, or targeting me with Charm Person, or targeting me and 2 other people with a 3rd level Charm Person. Only one of these cases satisfies the conditions for absorbing the enemy spell, so it seems that I need to know what spell is being cast and who it is targeting before I can even decide if it is possible for me to use my reaction to absorb it. However, it doesn’t necessarily make sense for me to have this information at the time the spell is cast. An alternative interpretation could be that when a spell is cast, I use my reaction to attempt to absorb it, but if the spell cannot be absorbed then my reaction is wasted with no effect. This seems like an unsatisfying interpretation, especially in a situation where multiple enemies are casting spells and wasting my reaction on a spell that I can’t absorb leaves me open to another spell that I could have absorbed. On the other hand, the last sentence of the quoted paragraph seems to lend some support to this interpretation, although it’s possible that sentence is only referring to the rod’s limited storage capacity.

So, is there an interpretation that best fits with RAW, or is all of this in the territory of DM ruling?

Note: You may assume that we are playing with the optional rule from XGtE for identifying a spell. In practice, this will mean that I cannot use my reaction to identify the incoming spell, because then I won’t have a reaction available to use with the rod. Additionally, as the example above shows, even knowing the identity of the spell being cast doesn’t guarantee that I will know whether it can be absorbed.

Are there features that actually specify their own bonus action timing?

The PHB States:

You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified, and anything that deprives you of your ability to take actions also prevents you from taking a bonus action.

I’ve found lots of triggering specifics, but nothing that says WHEN you have to take it.

Are there example(s) where the exact timing of the bonus action is dictated and not just the triggering requirement FOR a bonus action that you then choose when or if to use.

Phishing Email Timing

Sometimes I realize that I receive phising emails, just after doing some operations on the web. For instance, I was trying to pay taxes from my bank account (website was trusted 100%, I checked the signature), just after a few minutes I receive a phising email from bank with a fake email address.

Timing was very close with this operation I have performed. I had the same feeling in the past with other phising emails, but I always thoght was just a case. I wonder if there are some way / chance that this is not just a coincedence.

Use delay with a fixed total time to defend against timing attacks

Consider this common example used to demonstrate timing attacks:

async def sign_in(username, password):   user = await get_user_from_db(username)   if user is None:     return False  # early return :(    password_hash = slow_hash(password)   return verify(password_hash, user.password_hash) 

The usual suggestion is to do the same thing on all execution branches. For example, something like this:

async def sign_in(username, password):   user = await get_user_from_db(username)   if user is None:     actual_password_hash = "foo"   else:     actual_password_hash = user.password_hash    password_hash = slow_hash(password)   res = verify(password_hash, actual_password_hash)   return res and user is not None 

But I wonder if the following strategy is also useful against timing attacks (not considering other types of side-channel attacks), while not wasting computing resources:

async def sign_in(username, password):   # Longer than what `sign_in_impl` takes normally   fixed_duration = ...     _, sign_in_result = await asyncio.gather(delay(fixed_duration), sign_in_impl)    return sign_in_result  # Awaits a certain amount of time async def delay(duration):   ...  # This takes variable time async def sign_in_impl(username, password):   user = await get_user_from_db(username)   if user is None:     return False  # early return :(    password_hash = slow_hash(password)   return verify(password_hash, user.password_hash) 

Cutting Words timing when playing online

Lore Bard’s Cutting Words feature states the following:

Also at 3rd level, you learn how to use your wit to distract, confuse, and otherwise sap the confidence and competence of others. When a creature that you can see within 60 feet of you makes an attack roll, an ability check, or a damage roll, you can use your reaction to expend one of your uses of Bardic Inspiration, rolling a Bardic Inspiration die and subtracting the number rolled from the creature’s roll. You can choose to use this feature after the creature makes its roll, but before the DM determines whether the attack roll or ability check succeeds or fails, or before the creature deals its damage. The creature is immune if it can’t hear you or if it’s immune to being charmed.

What exactly does that mean. At what time do I have to say my DM I interrupt them?

When playing at a table, my DM usually goes this way: “The goblin attacks [player character] with their bow and [rolls] hits”. I can hear the dice roll and I say I want to know the result in order to decide if I want to use Cutting Words.

Now with the current sanitary situation, we play online, and the DM usually rolls their own physical dice and tells whether it hits or not because they have all our ACs registered. This basically forbids me to use my Cutting Words.

So what is the exact timing where I can interrupt the DM, online, and use my Cutting Words?

How does the reaction timing work for Wrath of the Storm? Can it potentially prevent the damage from the triggering attack?

With attacks of opportunity, the PHB is pretty clear that your reaction occurs as an interruption to your opponent’s move, just before they move beyond your reach, then they resume their turn. Fair enough.

However, there are some abilities that happen during an opponent’s attack – for example, the Shield spell, and a Tempest cleric’s Wrath of the Storm ability. These both say they happen when you’re “hit” by an attack – but the Shield spell raises your AC, so I assume that occurs before rolling damage, and makes it possible for you to be retroactively not hit by the attack. Is the same true for Wrath – that your reaction might KO your opponent, and you wouldn’t have to worry about taking damage?

(I was planning to include Hellish Rebuke in this question but I see it specifically refers to “being damaged”, so I assume that means it happens on your opponent’s turn but definitely after getting hit, meaning you can only cast it if you’re still conscious.)

Google Scrape Keeps Timing Out

hey guys,
I’ve got a problem with my scrape and would really appreciate any help anyone can give me.
Whenever i try to scrape Google, i get through about 30 searches, then Scrapebox starts returning zero results for everything else.

I’m using:

  • 50 semi-dedicated proxies from buyproxies.org
  • Detailed harvester
  • Scraping Google
  • 30 second delay
  • ~3,000 keywords to search

Why can’t i scrape using my entire list?

Is it an issue with my proxies?
Can anyone recommend a reliable source of proxies for scraping?

thanks!