Standard bolts have a specific length of thread irrespective of how long they are. From memory the thread length is 4x the diameter so as an example, for a 40mm long or less M10 bolt there would be no plain shank, just thread. For a 120mm long M10 bolt there would be 80mm of plain shank and 40mm of thread on the end. Actual dimensions depend on the spec they are made to, e.g. DIN, BS, ANSI etc.
Generally, you shouldn't have any threaded part of the bolt in the hole when a bolt is used in shear, as the threaded section is weaker than the plain shank and may also damage the inside of the hole. Also, there should be a minimum of 2 full threads exposed when the nut is tightened onto the bolt.