Electric bass and upright bass are completely different instruments. They happen to have their strings tuned to the same notes, but that's roughly where the similarity ends.
An electric bass is basically just a slightly bigger guitar with fewer and thicker strings. It can be played almost like a classical guitar (though that's not necessarily the best way to approach it). In particular, perhaps even more than guitar, every position is equally well playable on electric bass. You don't tend to even think much in absolute terms, what string is this and that note on, rather you have certain patterns that relate to the position you're currently playing in. Open strings are seldom used. It is usually possible to select one position that works for a whole passage, because you have four fingers that can cover four of the five notes before the next string takes over, so unless a passage has a lot of chromaticism, it's generally the easiest to just stay in that position; often players prefer position like fifth† over the lowest positions as long as the lowest E-string notes aren't required, both because the fret spacing is narrower in higher positions (thus make the four-finger playing style yet a bit easier), and because using the thicker strings at shorter length tend to give a bit of a thicker, warmer sound than the open or low-position strings.
On the other hand, shifting between positions is a bit of a hazard because the instrument is free to slip and dangle and also because of the very similarness between the positions, which means it's almost necessary to look at the fingerboard whenever changing position. No big deal, the fingerboard is marked for the purpose – though, anything you can do blind is better to do blind.
The last point is even actually much more important for double bass in classical music. In the orchestra, looking at your finger board is pretty much a no-no – your eyes are busy switching between the music and the conductor and/or section leader. And for bowed string instruments there's actually not much you could do by eye anyway – the view angle is wrong and there are no markings on the fingerboard. Not to mention, it is more important to get the position exactly right than on a fretted electric.
As a result, the playing technique of bowed strings relies much more heavily on some absolute “anchor” positions. (On cello these are mainly first† and fourth position; I think same for double bass.) Of course, that doesn't mean you can only play in those anchor positions, but it does mean you think about the other positions in a different way than e-bass does – each position has its own character, and is mostly thought of in terms how far of a shift it is from the nearest anchor position. And you normally wouldn't stay for a long time in e.g. third position, but rather switch briefly to e.g. fourth, or to an open string, or a harmonic – anything that re-calibrates your spatial awareness is good for intonation, as well as good to avoid a cramp from getting rutted down in that static position.
That's where the other important difference comes in: double bass is much, much more physically demanding than electric bass. Although someone with big hands may be in principle be able to employ the same “finger-per-fret” system as electric, this is hardly feasible in practice: the spread-out hand makes it difficult to put down enough pressure, and it's exacerbated by the fact that the scale length requires even wider spread than electric on the lowest positions. Therefore, few players ever do it this way. Instead, they put only two diatonic fingered notes in each string+position combination (or three chromatic ones), using ring finger and pinky as one unit. And that means that full scale runs require either open strings or position shifts in between. From an electric-bass perspective this is a nuisance, but again: the bowed strings anyway have other reasons why position shifts are a good idea, and because the instrument stands firmly on the ground and has physical features (in particular the neck joint) that makes the anchor positions easy to find without looking, this is actually a good thing.
So, what does all that mean for the Mingus example? Well, on electric bass the whole groove can be comfortably played in fifth position. There's no good reason to do it different. You could certainly do it more like the double bass original, but there are quite a few reasons not to:
- The open G string on normal electric basses just doesn't sound as good as it does on double bass. If you pluck it like any other note, it'll be feeble and thin, if you pluck it extra-soft over the fingerboard it'll be dull. If you use EQ to compensate, you'll ruin the sound of the rest of the instrument. And why would you, since the 5th-fret D string works perfectly fine!
- Electric bass requires careful damping of strings that aren't supposed to sound. Generally, the right hand damps the bass strings and the left hand damps the treble strings. By staying in fifth position the latter works almost automatically – a finger on the D-string can easily touch the G string to stop it from ringing, a finger that just leaves the D-string can still dampen its old note together with the RH finger that plucks the next note on the G string. Now – this wouldn't be much of a difficulty in first position w/ open strings either for this simple motif, but for faster melodic runs this can absolutely be a consideration. Even here, it's a good idea to make your hands' work as easy as possible so you can concentrate on nailing the tone / expression / groove. Even a little bit of sympathetic vibration on unwanted strings tends to make the sound muddy and unfocused.
Although damping isn't irrelevant on double bass either, the RH naturally lies such that it securely stops the low strings, and some light disturbances on other strings also aren't as problematic simply because double bass needs much more force to make a string audibly sound.
- While the groove is slow enough that it also wouldn't be difficult on electric to put lots of position changes in, there's another issue that would be annoying in this piece: position changes cause a bit of a squeaking sound, as the hand slides along the roundwound strings. Doesn't matter in a loud rock song, but in the intro here it would definitely annoy me.
(Flatwound strings don't have this problem as much, but they also sound always rather dull on electric – it's not my taste. Double bass uses flatwounds too, but the combination of long scale, acoustic body and loudly audible interaction between the strings and fretless fingerboard makes them sound much brighter than on an electric.)
†Important note: bowed strings and guitars use different terminology for their positions. Bowed strings number them diatonically, i.e. fourth position is the position where the index finger plays the A-string on the fourth scale note (which is a perfect fifth up, i.e. an E... the term “fifth” being of course a misnomer as it's actually the interval of size four). Guitars number them chromatically, i.e. seventh position on electric bass corresponds to fourth position on double bass.